Skip to content

Commit

Permalink
Details (#30)
Browse files Browse the repository at this point in the history
- FOL: add builtins for quantifier notations
- List: remove warnings
- Nat: remove non-linear rule ```$x - $x ↪ _0```
  • Loading branch information
fblanqui authored Jan 31, 2025
1 parent 2a4794a commit bd9470e
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 211 deletions.
4 changes: 4 additions & 0 deletions FOL.lp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ require open Stdlib.Set Stdlib.Prop;

constant symbol ∀ [a] : (τ a → Prop) → Prop; // !! or \forall

builtin "all" ≔ ∀;

notation ∀ quantifier;

rule π (∀ $f) ↪ Π x, π ($f x);
Expand All @@ -14,6 +16,8 @@ rule π (∀ $f) ↪ Π x, π ($f x);

constant symbol ∃ [a] : (τ a → Prop) → Prop; // ?? or \exists

builtin "ex" ≔ ∃;

notation ∃ quantifier;

constant symbol ∃ᵢ [a p] (x:τ a) : π (p x) → π (∃ p);
Expand Down
4 changes: 2 additions & 2 deletions List.lp
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ end;

symbol Arr : ℕ → Set → Set → TYPE;

rule Arr 0 $a $b ↪ τ $b
rule Arr 0 _ $b ↪ τ $b
with Arr ($n +1) $a $b ↪ τ $a → Arr $n $a $b;

// seqn
Expand All @@ -505,7 +505,7 @@ assert a (x y : τ a) ⊢ seqn 2 x y ≡ x ⸬ y ⸬ □;
// iota

symbol iota : ℕ → ℕ → 𝕃 nat;
rule iota $n 0 ↪ □
rule iota _ 0 ↪ □
with iota $n ($k +1) ↪ $n ⸬ iota ($n +1) $k;

assert ⊢ iota 1 2 ≡ 1 ⸬ 2 ⸬ □;
Expand Down
Loading

0 comments on commit bd9470e

Please sign in to comment.