chars
int64
40
24k
content_type
stringclasses
9 values
id
stringlengths
13
64
source
stringclasses
5 values
subset
stringclasses
31 values
text
stringlengths
40
24k
395
leanexplore_declaration
leanexplore:388497
leanexplore_sqlite
leanexplore_declarations
/-- Propositional contexts. -/ inductive Proposition.Context (Label : Type u) : Type u where | hole | andL (c : Context Label) (φ : Proposition Label) | andR (φ : Proposition Label) (c : Context Label) | orL (c : Context Label) (φ : Proposition Label) | orR (φ : Proposition Label) (c : Context Label) | diam...
50
leanexplore_declaration
leanexplore:388499
leanexplore_sqlite
leanexplore_declarations
| andL (c : Context Label) (φ : Proposition Label)
50
leanexplore_declaration
leanexplore:388500
leanexplore_sqlite
leanexplore_declarations
| andR (φ : Proposition Label) (c : Context Label)
49
leanexplore_declaration
leanexplore:388501
leanexplore_sqlite
leanexplore_declarations
| orL (c : Context Label) (φ : Proposition Label)
49
leanexplore_declaration
leanexplore:388502
leanexplore_sqlite
leanexplore_declarations
| orR (φ : Proposition Label) (c : Context Label)
41
leanexplore_declaration
leanexplore:388503
leanexplore_sqlite
leanexplore_declarations
| diamond (μ : Label) (c : Context Label)
402
leanexplore_declaration
leanexplore:388505
leanexplore_sqlite
leanexplore_declarations
/-- Replaces a hole in a propositional context with a proposition. -/ @[scoped grind =] def Proposition.Context.fill (c : Context Label) (φ : Proposition Label) := match c with | hole => φ | andL c φ' => (c.fill φ).and φ' | andR φ' c => φ'.and (c.fill φ) | orL c φ' => (c.fill φ).or φ' | orR φ' c => φ'.or (c...
98
leanexplore_declaration
leanexplore:388506
leanexplore_sqlite
leanexplore_declarations
instance : HasContext (Proposition Label) := ⟨Proposition.Context Label, Proposition.Context.fill⟩
156
leanexplore_declaration
leanexplore:388507
leanexplore_sqlite
leanexplore_declarations
instance : IsEquiv (Proposition Label) (Proposition.Equiv (State := State) (Label := Label)) where refl := by grind symm := by grind trans := by grind
423
leanexplore_declaration
leanexplore:388508
leanexplore_sqlite
leanexplore_declarations
instance {State : Type u} {Label : Type v} : Congruence (Proposition Label) (Proposition.Equiv (State := State) (Label := Label)) where elim : Covariant (Proposition.Context Label) (Proposition Label) (Proposition.Context.fill) Proposition.Equiv := by intro ctx a b hab lts specialize hab lts ...
324
leanexplore_declaration
leanexplore:388509
leanexplore_sqlite
leanexplore_declarations
/-- Bundled version of a judgement for `Satisfy`. -/ structure Satisfies.Judgement (State : Type u) (Label : Type v) where /-- The state transition system to consider. -/ lts : LTS State Label /-- The state to check the proposition against. -/ state : State /-- The proposition to check. -/ φ : Proposition L...
143
leanexplore_declaration
leanexplore:388510
leanexplore_sqlite
leanexplore_declarations
/-- `Satisfies` variant using bundled judgements. -/ def Satisfies.Bundled (j : Satisfies.Judgement State Label) := Satisfies j.lts j.state j.φ
110
leanexplore_declaration
leanexplore:388511
leanexplore_sqlite
leanexplore_declarations
@[scoped grind =] theorem Satisfies.bundled_char : Satisfies.Bundled j ↔ Satisfies j.lts j.state j.φ := by rfl
236
leanexplore_declaration
leanexplore:388512
leanexplore_sqlite
leanexplore_declarations
/-- Judgemental contexts. -/ structure Satisfies.Context (State : Type u) (Label : Type v) where /-- The state transition system to consider. -/ lts : LTS State Label /-- The state to check propositions against. -/ state : State
228
leanexplore_declaration
leanexplore:388513
leanexplore_sqlite
leanexplore_declarations
/-- Fills a judgemental context with a proposition. -/ def Satisfies.Context.fill (c : Satisfies.Context State Label) (φ : Proposition Label) : Satisfies.Judgement State Label where lts := c.lts state := c.state φ := φ
160
leanexplore_declaration
leanexplore:388514
leanexplore_sqlite
leanexplore_declarations
instance judgementalContext : HasHContext (Satisfies.Judgement State Label) (Proposition Label) := ⟨Satisfies.Context State Label, Satisfies.Context.fill⟩
550
leanexplore_declaration
leanexplore:388515
leanexplore_sqlite
leanexplore_declarations
instance : LogicalEquivalence (Proposition Label) (Satisfies.Judgement State Label) (Satisfies.Bundled) where eqv := Proposition.Equiv eqv_fill_valid {a b : Proposition Label} (heqv : a.Equiv (State := State) b) (c : HasHContext.Context (Satisfies.Judgement State Label) (Proposition Label)) (h : Sat...
743
leanexplore_declaration
leanexplore:388516
leanexplore_sqlite
leanexplore_declarations
/-- Propositions. -/ inductive Proposition (Atom : Type u) : Type u where | atom (x : Atom) | atomDual (x : Atom) | one | zero | top | bot /-- The multiplicative conjunction connective. -/ | tensor (a b : Proposition Atom) /-- The multiplicative disjunction connective. -/ | parr (a b : Proposition A...
85
leanexplore_declaration
leanexplore:388523
leanexplore_sqlite
leanexplore_declarations
/-- The multiplicative conjunction connective. -/ | tensor (a b : Proposition Atom)
83
leanexplore_declaration
leanexplore:388524
leanexplore_sqlite
leanexplore_declarations
/-- The multiplicative disjunction connective. -/ | parr (a b : Proposition Atom)
78
leanexplore_declaration
leanexplore:388525
leanexplore_sqlite
leanexplore_declarations
/-- The additive disjunction connective. -/ | oplus (a b : Proposition Atom)
77
leanexplore_declaration
leanexplore:388526
leanexplore_sqlite
leanexplore_declarations
/-- The additive conjunction connective. -/ | with (a b : Proposition Atom)
67
leanexplore_declaration
leanexplore:388527
leanexplore_sqlite
leanexplore_declarations
/-- The "of course" exponential. -/ | bang (a : Proposition Atom)
159
leanexplore_declaration
leanexplore:388528
leanexplore_sqlite
leanexplore_declarations
/-- The "why not" exponential. This is written as ʔ, or \_?, to distinguish itself from the lean syntatical hole ? syntax -/ | quest (a : Proposition Atom)
45
leanexplore_declaration
leanexplore:388533
leanexplore_sqlite
leanexplore_declarations
instance : Zero (Proposition Atom) := ⟨.zero⟩
43
leanexplore_declaration
leanexplore:388534
leanexplore_sqlite
leanexplore_declarations
instance : One (Proposition Atom) := ⟨.one⟩
43
leanexplore_declaration
leanexplore:388535
leanexplore_sqlite
leanexplore_declarations
instance : Top (Proposition Atom) := ⟨.top⟩
43
leanexplore_declaration
leanexplore:388536
leanexplore_sqlite
leanexplore_declarations
instance : Bot (Proposition Atom) := ⟨.bot⟩
1,176
leanexplore_declaration
leanexplore:388537
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped infix:35 " ⊗ " => Proposition.tensor @[inherit_doc] scoped infix:35 " ⊕ " => Proposition.oplus @[inherit_doc] scoped infix:30 " ⅋ " => Proposition.parr @[inherit_doc] scoped infix:30 " & " => Proposition.with @[inherit_doc] scoped prefix:95 "!" => Proposition.bang @[inherit_doc] scoped prefix:95 ...
1,117
leanexplore_declaration
leanexplore:388538
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped infix:35 " ⊕ " => Proposition.oplus @[inherit_doc] scoped infix:30 " ⅋ " => Proposition.parr @[inherit_doc] scoped infix:30 " & " => Proposition.with @[inherit_doc] scoped prefix:95 "!" => Proposition.bang @[inherit_doc] scoped prefix:95 "ʔ" => Proposition.quest /-- Propositional contexts (singl...
1,059
leanexplore_declaration
leanexplore:388539
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped infix:30 " ⅋ " => Proposition.parr @[inherit_doc] scoped infix:30 " & " => Proposition.with @[inherit_doc] scoped prefix:95 "!" => Proposition.bang @[inherit_doc] scoped prefix:95 "ʔ" => Proposition.quest /-- Propositional contexts (single-hole contexts for propositions). -/ inductive Propositio...
1,002
leanexplore_declaration
leanexplore:388540
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped infix:30 " & " => Proposition.with @[inherit_doc] scoped prefix:95 "!" => Proposition.bang @[inherit_doc] scoped prefix:95 "ʔ" => Proposition.quest /-- Propositional contexts (single-hole contexts for propositions). -/ inductive Proposition.Context (Atom : Type u) : Type u where | hole | ten...
944
leanexplore_declaration
leanexplore:388541
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped prefix:95 "!" => Proposition.bang @[inherit_doc] scoped prefix:95 "ʔ" => Proposition.quest /-- Propositional contexts (single-hole contexts for propositions). -/ inductive Proposition.Context (Atom : Type u) : Type u where | hole | tensorL (c : Context Atom) (b : Proposition Atom) | tensorR...
888
leanexplore_declaration
leanexplore:388542
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped prefix:95 "ʔ" => Proposition.quest /-- Propositional contexts (single-hole contexts for propositions). -/ inductive Proposition.Context (Atom : Type u) : Type u where | hole | tensorL (c : Context Atom) (b : Proposition Atom) | tensorR (a : Proposition Atom) (c : Context Atom) | parrL (c ...
645
leanexplore_declaration
leanexplore:388543
leanexplore_sqlite
leanexplore_declarations
/-- Propositional contexts (single-hole contexts for propositions). -/ inductive Proposition.Context (Atom : Type u) : Type u where | hole | tensorL (c : Context Atom) (b : Proposition Atom) | tensorR (a : Proposition Atom) (c : Context Atom) | parrL (c : Context Atom) (b : Proposition Atom) | parrR (a : Prop...
51
leanexplore_declaration
leanexplore:388545
leanexplore_sqlite
leanexplore_declarations
| tensorL (c : Context Atom) (b : Proposition Atom)
51
leanexplore_declaration
leanexplore:388546
leanexplore_sqlite
leanexplore_declarations
| tensorR (a : Proposition Atom) (c : Context Atom)
49
leanexplore_declaration
leanexplore:388547
leanexplore_sqlite
leanexplore_declarations
| parrL (c : Context Atom) (b : Proposition Atom)
49
leanexplore_declaration
leanexplore:388548
leanexplore_sqlite
leanexplore_declarations
| parrR (a : Proposition Atom) (c : Context Atom)
50
leanexplore_declaration
leanexplore:388549
leanexplore_sqlite
leanexplore_declarations
| oplusL (c : Context Atom) (b : Proposition Atom)
50
leanexplore_declaration
leanexplore:388550
leanexplore_sqlite
leanexplore_declarations
| oplusR (a : Proposition Atom) (c : Context Atom)
49
leanexplore_declaration
leanexplore:388551
leanexplore_sqlite
leanexplore_declarations
| withL (c : Context Atom) (b : Proposition Atom)
49
leanexplore_declaration
leanexplore:388552
leanexplore_sqlite
leanexplore_declarations
| withR (a : Proposition Atom) (c : Context Atom)
576
leanexplore_declaration
leanexplore:388559
leanexplore_sqlite
leanexplore_declarations
/-- Replaces the hole in a propositional context with a propositions. -/ @[scoped grind =] def Proposition.Context.fill (c : Context Atom) (a : Proposition Atom) : Proposition Atom := match c with | hole => a | tensorL c b => .tensor (c.fill a) b | tensorR b c => .tensor b (c.fill a) | parrL c b => .parr (c.f...
96
leanexplore_declaration
leanexplore:388560
leanexplore_sqlite
leanexplore_declarations
instance : HasContext (Proposition Atom) := ⟨Proposition.Context Atom, Proposition.Context.fill⟩
162
leanexplore_declaration
leanexplore:388561
leanexplore_sqlite
leanexplore_declarations
/-- Definition of context filling. -/ @[scoped grind =] theorem Proposition.context_fill_def (c : Context Atom) (a : Proposition Atom) : c<[a] = c.fill a := rfl
211
leanexplore_declaration
leanexplore:388562
leanexplore_sqlite
leanexplore_declarations
/-- Positive propositions. -/ def Proposition.positive : Proposition Atom → Bool | atom _ => true | one => true | zero => true | tensor _ _ => true | oplus _ _ => true | bang _ => true | _ => false
213
leanexplore_declaration
leanexplore:388563
leanexplore_sqlite
leanexplore_declarations
/-- Negative propositions. -/ def Proposition.negative : Proposition Atom → Bool | atomDual _ => true | bot => true | top => true | parr _ _ => true | .with _ _ => true | quest _ => true | _ => false
169
leanexplore_declaration
leanexplore:388564
leanexplore_sqlite
leanexplore_declarations
/-- Whether a `Proposition` is positive is decidable. -/ instance Proposition.positive_decidable (a : Proposition Atom) : Decidable a.positive := a.positive.decEq true
169
leanexplore_declaration
leanexplore:388565
leanexplore_sqlite
leanexplore_declarations
/-- Whether a `Proposition` is negative is decidable. -/ instance Proposition.negative_decidable (a : Proposition Atom) : Decidable a.negative := a.negative.decEq true
420
leanexplore_declaration
leanexplore:388566
leanexplore_sqlite
leanexplore_declarations
/-- Propositional duality. -/ @[scoped grind =] def Proposition.dual : Proposition Atom → Proposition Atom | atom x => atomDual x | atomDual x => atom x | one => bot | bot => one | zero => top | top => zero | tensor a b => parr a.dual b.dual | parr a b => tensor a.dual b.dual | oplus a b => .with a.du...
150
leanexplore_declaration
leanexplore:388567
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped postfix:max "⫠" => Proposition.dual @[scoped grind =] theorem Proposition.top_eq_zero_dual : ⊤ = (0⫠ : Proposition Atom) := rfl
91
leanexplore_declaration
leanexplore:388568
leanexplore_sqlite
leanexplore_declarations
@[scoped grind =] theorem Proposition.top_eq_zero_dual : ⊤ = (0⫠ : Proposition Atom) := rfl
174
leanexplore_declaration
leanexplore:388569
leanexplore_sqlite
leanexplore_declarations
/-- Duality preserves size. -/ @[scoped grind _=_] theorem Proposition.dual_sizeOf (a : Proposition Atom) : sizeOf a = sizeOf a⫠ := by induction a <;> simp [dual] <;> grind
166
leanexplore_declaration
leanexplore:388570
leanexplore_sqlite
leanexplore_declarations
/-- No proposition is equal to its dual. -/ @[scoped grind .] theorem Proposition.dual_neq (a : Proposition Atom) : a ≠ a⫠ := by cases a <;> simp [Proposition.dual]
261
leanexplore_declaration
leanexplore:388571
leanexplore_sqlite
leanexplore_declarations
/-- Two propositions are equal iff their respective duals are equal. -/ @[scoped grind =, simp] theorem Proposition.dual_inj (a b : Proposition Atom) : a⫠ = b⫠ ↔ a = b := by refine ⟨fun h ↦ ?_, congrArg dual⟩ induction a generalizing b <;> cases b <;> grind
162
leanexplore_declaration
leanexplore:388572
leanexplore_sqlite
leanexplore_declarations
/-- Duality is an involution. -/ @[scoped grind =, simp] theorem Proposition.dual_involution (a : Proposition Atom) : a⫠⫠ = a := by induction a <;> grind [dual]
122
leanexplore_declaration
leanexplore:388573
leanexplore_sqlite
leanexplore_declarations
/-- Linear implication. -/ @[scoped grind =] def Proposition.linImpl (a b : Proposition Atom) : Proposition Atom := a⫠ ⅋ b
166
leanexplore_declaration
leanexplore:388574
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped infix:25 " ⊸ " => Proposition.linImpl /-- A sequent in CLL is a multiset of propositions. -/ abbrev Sequent Atom := Multiset (Proposition Atom)
105
leanexplore_declaration
leanexplore:388575
leanexplore_sqlite
leanexplore_declarations
/-- A sequent in CLL is a multiset of propositions. -/ abbrev Sequent Atom := Multiset (Proposition Atom)
171
leanexplore_declaration
leanexplore:388576
leanexplore_sqlite
leanexplore_declarations
/-- Checks that all propositions in a sequent `Γ` are question marks. -/ def Sequent.allQuest (Γ : Sequent Atom) := Γ.map (· matches ʔ_) |> Multiset.fold Bool.and true
77
leanexplore_declaration
leanexplore:388577
leanexplore_sqlite
leanexplore_declarations
/-- Judgemental contexts for CLL. -/ def Sequent.Context Atom := Sequent Atom
143
leanexplore_declaration
leanexplore:388578
leanexplore_sqlite
leanexplore_declarations
/-- Filling a judgemental context returns a sequent. -/ def Sequent.Context.fill (Γc : Sequent.Context Atom) (a : Proposition Atom) := a ::ₘ Γc
106
leanexplore_declaration
leanexplore:388579
leanexplore_sqlite
leanexplore_declarations
instance : HasHContext (Sequent Atom) (Proposition Atom) := ⟨Sequent.Context Atom, Sequent.Context.fill⟩
816
leanexplore_declaration
leanexplore:388580
leanexplore_sqlite
leanexplore_declarations
/-- A proof in the sequent calculus for classical linear logic. -/ inductive Proof : Sequent Atom → Type u where | ax : Proof {a, a⫠} | cut : Proof (a ::ₘ Γ) → Proof (a⫠ ::ₘ Δ) → Proof (Γ + Δ) | one : Proof {1} | bot : Proof Γ → Proof (⊥ ::ₘ Γ) | parr : Proof (a ::ₘ b ::ₘ Γ) → Proof ((a ⅋ b) ::ₘ Γ) | tensor...
58
leanexplore_declaration
leanexplore:388582
leanexplore_sqlite
leanexplore_declarations
| cut : Proof (a ::ₘ Γ) → Proof (a⫠ ::ₘ Δ) → Proof (Γ + Δ)
54
leanexplore_declaration
leanexplore:388585
leanexplore_sqlite
leanexplore_declarations
| parr : Proof (a ::ₘ b ::ₘ Γ) → Proof ((a ⅋ b) ::ₘ Γ)
74
leanexplore_declaration
leanexplore:388586
leanexplore_sqlite
leanexplore_declarations
| tensor : Proof (a ::ₘ Γ) → Proof (b ::ₘ Δ) → Proof ((a ⊗ b) ::ₘ (Γ + Δ))
50
leanexplore_declaration
leanexplore:388587
leanexplore_sqlite
leanexplore_declarations
| oplus₁ : Proof (a ::ₘ Γ) → Proof ((a ⊕ b) ::ₘ Γ)
50
leanexplore_declaration
leanexplore:388588
leanexplore_sqlite
leanexplore_declarations
| oplus₂ : Proof (b ::ₘ Γ) → Proof ((a ⊕ b) ::ₘ Γ)
66
leanexplore_declaration
leanexplore:388589
leanexplore_sqlite
leanexplore_declarations
| with : Proof (a ::ₘ Γ) → Proof (b ::ₘ Γ) → Proof ((a & b) ::ₘ Γ)
44
leanexplore_declaration
leanexplore:388591
leanexplore_sqlite
leanexplore_declarations
| quest : Proof (a ::ₘ Γ) → Proof (ʔa ::ₘ Γ)
55
leanexplore_declaration
leanexplore:388593
leanexplore_sqlite
leanexplore_declarations
| contract : Proof (ʔa ::ₘ ʔa ::ₘ Γ) → Proof (ʔa ::ₘ Γ)
81
leanexplore_declaration
leanexplore:388594
leanexplore_sqlite
leanexplore_declarations
| bang {Γ : Sequent Atom} {a} : Γ.allQuest → Proof (a ::ₘ Γ) → Proof ((!a) ::ₘ Γ)
52
leanexplore_declaration
leanexplore:388595
leanexplore_sqlite
leanexplore_declarations
instance : InferenceSystem (Sequent Atom) := ⟨Proof⟩
185
leanexplore_declaration
leanexplore:388596
leanexplore_sqlite
leanexplore_declarations
/-- Convenience definition for rewriting conclusions in proofs. -/ @[scoped grind =] def Proof.rwConclusion {Γ Δ : Sequent Atom} (h : Γ = Δ) (p : ⇓Γ) := InferenceSystem.rwConclusion h p
192
leanexplore_declaration
leanexplore:388597
leanexplore_sqlite
leanexplore_declarations
/-- The axiom, but where the order of propositions is reversed. -/ @[scoped grind <=] def Proof.ax' {a : Proposition Atom} : ⇓({a⫠, a} : Sequent Atom) := Multiset.pair_comm a (a⫠) ▸ Proof.ax
207
leanexplore_declaration
leanexplore:388598
leanexplore_sqlite
leanexplore_declarations
/-- Cut, but where the premises are reversed. -/ @[scoped grind =] def Proof.cut' (p : ⇓(a⫠ ::ₘ Γ)) (q : ⇓(a ::ₘ Δ)) : ⇓(Γ + Δ) := let r : ⇓(a⫠⫠ ::ₘ Δ) := (Proposition.dual_involution a).symm ▸ q p.cut r
261
leanexplore_declaration
leanexplore:388599
leanexplore_sqlite
leanexplore_declarations
/-- Inversion of the ⅋ rule. -/ @[scoped grind =] def Proof.parr_inversion {Γ : Sequent Atom} (h : ⇓((a ⅋ b) ::ₘ Γ)) : ⇓(a ::ₘ b ::ₘ Γ) := show a ::ₘ b ::ₘ Γ = {a, b} + Γ by simp ▸ cut' (show ({a, b} : Sequent Atom) = {a} + {b} by simp ▸ tensor ax' ax') h
188
leanexplore_declaration
leanexplore:388600
leanexplore_sqlite
leanexplore_declarations
/-- Inversion of the ⊥ rule. -/ @[scoped grind =] def Proof.bot_inversion {Γ : Sequent Atom} (h : ⇓(⊥ ::ₘ Γ)) : ⇓Γ := by convert Proof.cut' (a := ⊥) (Γ := {}) (Δ := Γ) Proof.one h simp
185
leanexplore_declaration
leanexplore:388601
leanexplore_sqlite
leanexplore_declarations
/-- Inversion of the & rule, first component. -/ @[scoped grind =] def Proof.with_inversion₁ {Γ : Sequent Atom} (h : ⇓((a & b) ::ₘ Γ)) : ⇓(a ::ₘ Γ) := cut' (a := a & b) (oplus₁ ax') h
186
leanexplore_declaration
leanexplore:388602
leanexplore_sqlite
leanexplore_declarations
/-- Inversion of the & rule, second component. -/ @[scoped grind =] def Proof.with_inversion₂ {Γ : Sequent Atom} (h : ⇓((a & b) ::ₘ Γ)) : ⇓(b ::ₘ Γ) := cut' (a := a & b) (oplus₂ ax') h
209
leanexplore_declaration
leanexplore:388603
leanexplore_sqlite
leanexplore_declarations
/-- Two propositions are equivalent if one implies the other and vice versa. Proof-relevant version. -/ def Proposition.equiv (a b : Proposition Atom) := ⇓({a⫠, b} : Sequent Atom) × ⇓({b⫠, a} : Sequent Atom)
194
leanexplore_declaration
leanexplore:388604
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped infix:29 " ≡⇓ " => Proposition.equiv open Sequent in /-- Propositional equivalence, proof-irrelevant version (`Prop`). -/ def Proposition.Equiv (a b : Proposition Atom) :=
192
leanexplore_declaration
leanexplore:388605
leanexplore_sqlite
leanexplore_declarations
/-- Propositional equivalence, proof-irrelevant version (`Prop`). -/ def Proposition.Equiv (a b : Proposition Atom) := Derivable ({a⫠, b} : Sequent Atom) ∧ Derivable ({b⫠, a} : Sequent Atom)
223
leanexplore_declaration
leanexplore:388606
leanexplore_sqlite
leanexplore_declarations
@[inherit_doc] scoped infix:29 " ≡ " => Proposition.Equiv /-- Conversion from proof-relevant to proof-irrelevant versions of propositional equivalence. -/ theorem Proposition.equiv.toProp (h : a ≡⇓ b) : a ≡ b := ⟨h.1, h.2⟩
164
leanexplore_declaration
leanexplore:388607
leanexplore_sqlite
leanexplore_declarations
/-- Conversion from proof-relevant to proof-irrelevant versions of propositional equivalence. -/ theorem Proposition.equiv.toProp (h : a ≡⇓ b) : a ≡ b := ⟨h.1, h.2⟩
144
leanexplore_declaration
leanexplore:388608
leanexplore_sqlite
leanexplore_declarations
/-- Proof-relevant equivalence is coerciable into proof-irrelevant equivalence. -/ instance : Coe (a ≡⇓ b) (a ≡ b) := ⟨Proposition.equiv.toProp⟩
165
leanexplore_declaration
leanexplore:388609
leanexplore_sqlite
leanexplore_declarations
/-- Transforms a proof-irrelevant equivalence into a proof-relevant one (this is not computable). -/ noncomputable def chooseEquiv (h : a ≡ b) : a ≡⇓ b := ⟨h.1, h.2⟩
138
leanexplore_declaration
leanexplore:388610
leanexplore_sqlite
leanexplore_declarations
/-- Proof-relevant equivalence is reflexive. -/ @[scoped grind =] def equiv.refl (a : Proposition Atom) : a ≡⇓ a := ⟨Proof.ax', Proof.ax'⟩
139
leanexplore_declaration
leanexplore:388611
leanexplore_sqlite
leanexplore_declarations
/-- Proof-relevant equivalence is symmetric. -/ @[scoped grind =] def equiv.symm (a : Proposition Atom) (h : a ≡⇓ b) : b ≡⇓ a := ⟨h.2, h.1⟩
259
leanexplore_declaration
leanexplore:388612
leanexplore_sqlite
leanexplore_declarations
/-- Proof-relevant equivalence is transitive. -/ @[scoped grind =] def equiv.trans {a b c : Proposition Atom} (hab : a ≡⇓ b) (hbc : b ≡⇓ c) : a ≡⇓ c := ⟨(Multiset.pair_comm b (a⫠) ▸ hab.fst).cut hbc.fst, (Multiset.pair_comm b (c⫠) ▸ hbc.snd).cut hab.snd⟩
139
leanexplore_declaration
leanexplore:388613
leanexplore_sqlite
leanexplore_declarations
/-- Proof-irrelevant equivalence is reflexive. -/ @[refl, scoped grind .] theorem Equiv.refl (a : Proposition Atom) : a ≡ a := equiv.refl a
151
leanexplore_declaration
leanexplore:388614
leanexplore_sqlite
leanexplore_declarations
/-- Proof-irrelevant equivalence is symmetric. -/ @[symm, scoped grind →] theorem Equiv.symm {a b : Proposition Atom} (h : a ≡ b) : b ≡ a := ⟨h.2, h.1⟩
204
leanexplore_declaration
leanexplore:388615
leanexplore_sqlite
leanexplore_declarations
/-- Proof-irrelevant equivalence is transitive. -/ @[scoped grind →] theorem Equiv.trans {a b c : Proposition Atom} (hab : a ≡ b) (hbc : b ≡ c) : a ≡ c := equiv.trans (chooseEquiv hab) (chooseEquiv hbc)
159
leanexplore_declaration
leanexplore:388616
leanexplore_sqlite
leanexplore_declarations
/-- The canonical equivalence relation for propositions. -/ def propositionSetoid : Setoid (Proposition Atom) := ⟨Equiv, Equiv.refl, Equiv.symm, Equiv.trans⟩
181
leanexplore_declaration
leanexplore:388617
leanexplore_sqlite
leanexplore_declarations
instance : IsEquiv (Proposition Atom) Proposition.Equiv where refl := Equiv.refl symm a b := Equiv.symm (a := a) (b := b) trans a b c := Equiv.trans (a := a) (b := b) (c := c)
127
leanexplore_declaration
leanexplore:388618
leanexplore_sqlite
leanexplore_declarations
/-- !⊤ ≡⇓ 1 -/ @[scoped grind =] def bang_top_eqv_one : (!⊤ : Proposition Atom) ≡⇓ 1 := ⟨.weaken .one, .bot (.bang rfl .top)⟩
212
leanexplore_declaration
leanexplore:388619
leanexplore_sqlite
leanexplore_declarations
/-- ʔ0 ≡⇓ ⊥ -/ @[scoped grind =] def quest_zero_eqv_bot : (ʔ0 : Proposition Atom) ≡⇓ ⊥ := ⟨rwConclusion (Multiset.pair_comm ..) <| .bot (.bang rfl .top), rwConclusion (Multiset.pair_comm ..) <| .weaken .one⟩
161
leanexplore_declaration
leanexplore:388620
leanexplore_sqlite
leanexplore_declarations
/-- a ⊗ 0 ≡⇓ 0 -/ @[scoped grind =] def tensor_zero_eqv_zero (a : Proposition Atom) : a ⊗ 0 ≡⇓ 0 := ⟨.parr <| .rwConclusion (Multiset.cons_swap ..) .top, .top⟩