Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Prop.lp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ builtin "Prf" ≔ π;

constant symbol ⊤ : Prop; // \top

builtin "top" ≔ ⊤;

constant symbol ⊤ᵢ : π ⊤;

// false

constant symbol ⊥ : Prop; // \bot

builtin "bot" ≔ ⊤;

constant symbol ⊥ₑ [p] : π ⊥ → π p;

// implication
Expand All @@ -28,6 +32,8 @@ constant symbol ⇒ : Prop → Prop → Prop; // =>

notation ⇒ infix right 5;

builtin "imp" ≔ ⇒;

rule π ($p ⇒ $q) ↪ π $p → π $q;

symbol fold_⇒ [p q] : π (p ⇒ q) → π p → π q ≔
Expand All @@ -41,12 +47,16 @@ symbol ¬ p ≔ p ⇒ ⊥; // ~~ or \neg

notation ¬ prefix 35;

builtin "not" ≔ ¬;

// conjunction

constant symbol ∧ : Prop → Prop → Prop; // /\ or \wedge

notation ∧ infix right 7;

builtin "and" ≔ ∧;

constant symbol ∧ᵢ [p q] : π p → π q → π (p ∧ q);
symbol ∧ₑ₁ [p q] : π (p ∧ q) → π p;
symbol ∧ₑ₂ [p q] : π (p ∧ q) → π q;
Expand All @@ -57,6 +67,8 @@ constant symbol ∨ : Prop → Prop → Prop; // \/ or \vee

notation ∨ infix right 6;

builtin "or" ≔ ∨;

constant symbol ∨ᵢ₁ [p q] : π p → π (p ∨ q);
constant symbol ∨ᵢ₂ [p q] : π q → π (p ∨ q);
symbol ∨ₑ [p q r] : π (p ∨ q) → (π p → π r) → (π q → π r) → π r;
Expand All @@ -67,6 +79,8 @@ symbol ⇔ p q ≔ (p ⇒ q) ∧ (q ⇒ p); // \Leftrightarrow

notation ⇔ infix right 5;

builtin "eqv" ≔ ⇔;

opaque symbol ⇔_refl [p] : π (p ⇔ p) ≔
begin
assume p; apply ∧ᵢ { assume h; apply h } { assume h; apply h }
Expand Down