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 |
|---|---|---|---|---|---|
312 | leanexplore_declaration | leanexplore:388721 | leanexplore_sqlite | leanexplore_declarations | lemma tensor_assoc_aux {F G : Set P} :
(F⫠⫠) * (G⫠⫠) ⊆ (F * G)⫠⫠ := by
simp only [Set.subset_def, Set.mem_mul, forall_exists_index, and_imp]
rintro _ p hp q hq rfl v hv
rw [mul_assoc]
refine hp _ fun f hf => ?_
have : v * f ∈ G⫠ := fun g hg => mul_assoc v f g ▸ hv _ (Set.mul_mem_mul hf hg)
grind |
710 | leanexplore_declaration | leanexplore:388722 | leanexplore_sqlite | leanexplore_declarations | lemma coe_tensor_assoc {G H K : Fact P} :
((G ⊗ H) ⊗ K : Set P) = ((G : Set P) * ((H : Set P) * (K : Set P)))⫠⫠ := by
simp only [tensor]
refine Set.Subset.antisymm ?_ ?_
· simp only [dualFact, mk_dual, mk_subset, coe_mk, dual_dual_subset_dual_iff]
rw [K.eq]
refine tensor_assoc_aux.trans ?_
rw [← K... |
189 | leanexplore_declaration | leanexplore:388723 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma tensor_assoc {G H K : Fact P} : ((G ⊗ H) ⊗ K) = (G ⊗ H ⊗ K) :=
SetLike.coe_injective <| by
grind [SetLike.coe_injective, coe_tensor_assoc, tensor_comm, coe_tensor_assoc] |
101 | leanexplore_declaration | leanexplore:388724 | leanexplore_sqlite | leanexplore_declarations | lemma tensor_rotate {G H K : Fact P} : (G ⊗ H ⊗ K) = H ⊗ K ⊗ G := by
rw [tensor_comm, tensor_assoc] |
157 | leanexplore_declaration | leanexplore:388725 | leanexplore_sqlite | leanexplore_declarations | lemma tensor_le_tensor {G K H} {L : Fact P} (hGK : G ≤ K) (hHL : H ≤ L) : (G ⊗ H) ≤ (K ⊗ L) :=
orth_antitone <| orth_antitone <| Set.mul_subset_mul hGK hHL |
297 | leanexplore_declaration | leanexplore:388726 | leanexplore_sqlite | leanexplore_declarations | lemma tensor_of_par {G H : Fact P} : (G ⊗ H) = (Gᗮ ⅋ Hᗮ)ᗮ :=
SetLike.coe_injective <| by
simp only [tensor, parr, dualFact, mk_dual, mk_subset, coe_mk]
rw [G.eq, H.eq]
#adaptation_note
/-- A grind regression found moving to nightly-2026-03-31 (changes from lean#13166) -/
rfl |
86 | leanexplore_declaration | leanexplore:388727 | leanexplore_sqlite | leanexplore_declarations | lemma par_of_tensor {G H : Fact P} : (G ⅋ H) = (Gᗮ ⊗ Hᗮ)ᗮ := by
simp [tensor_of_par] |
164 | leanexplore_declaration | leanexplore:388728 | leanexplore_sqlite | leanexplore_declarations | lemma par_le_par {G H K L : Fact P} (hGK : G ≤ K) (hHL : H ≤ L) : (G ⅋ H) ≤ (K ⅋ L) :=
orth_antitone <| Set.mul_subset_mul (orth_antitone hGK) (orth_antitone hHL) |
75 | leanexplore_declaration | leanexplore:388729 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma bot_par {G : Fact P} : (⊥ ⅋ G) = G := by simp [par_of_tensor] |
75 | leanexplore_declaration | leanexplore:388730 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma par_bot {G : Fact P} : (G ⅋ ⊥) = G := by simp [par_of_tensor] |
97 | leanexplore_declaration | leanexplore:388731 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma par_assoc {G H K : Fact P} : ((G ⅋ H) ⅋ K) = (G ⅋ H ⅋ K) := by simp [par_of_tensor] |
89 | leanexplore_declaration | leanexplore:388732 | leanexplore_sqlite | leanexplore_declarations | lemma par_comm (G H : Fact P) : (G ⅋ H) = (H ⅋ G) := by simp [par_of_tensor, tensor_comm] |
181 | leanexplore_declaration | leanexplore:388733 | leanexplore_sqlite | leanexplore_declarations | /--
Linear implication between facts,
defined as the dual of the orthogonal of the pointwise product.
-/
def linImpl (X Y : Fact P) : Fact P := dualFact ((X : Set P) * (Y : Set P)⫠) |
105 | leanexplore_declaration | leanexplore:388734 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] infix:73 " ⊸ " => linImpl
lemma linImpl_of_tensor {G H : Fact P} : (G ⊸ H) = (G ⊗ Hᗮ)ᗮ := |
212 | leanexplore_declaration | leanexplore:388735 | leanexplore_sqlite | leanexplore_declarations | lemma linImpl_of_tensor {G H : Fact P} : (G ⊸ H) = (G ⊗ Hᗮ)ᗮ :=
SetLike.coe_injective <| by
simp only [linImpl, tensor, coe_neg, dualFact, mk_dual, mk_subset, coe_mk]
apply Set.Subset.antisymm <;> grind |
110 | leanexplore_declaration | leanexplore:388736 | leanexplore_sqlite | leanexplore_declarations | lemma par_of_linImpl {G H : Fact P} : (G ⅋ H) = (Gᗮ ⊸ H) :=
SetLike.coe_injective <| by simp [parr, linImpl] |
91 | leanexplore_declaration | leanexplore:388737 | leanexplore_sqlite | leanexplore_declarations | lemma tensor_of_linImpl {G H : Fact P} : (G ⊗ H) = (G ⊸ Hᗮ)ᗮ := by simp [linImpl_of_tensor] |
84 | leanexplore_declaration | leanexplore:388738 | leanexplore_sqlite | leanexplore_declarations | lemma linImpl_of_par {G H : Fact P} : (G ⊸ H) = (Gᗮ ⅋ H) := by simp [par_of_linImpl] |
86 | leanexplore_declaration | leanexplore:388739 | leanexplore_sqlite | leanexplore_declarations | lemma neg_tensor {G H : Fact P} : (G ⊗ H)ᗮ = Gᗮ ⅋ Hᗮ := by rw [tensor_of_par, neg_neg] |
83 | leanexplore_declaration | leanexplore:388740 | leanexplore_sqlite | leanexplore_declarations | lemma neg_par {G H : Fact P} : (G ⅋ H)ᗮ = Gᗮ ⊗ Hᗮ := by rw [par_of_tensor, neg_neg] |
84 | leanexplore_declaration | leanexplore:388741 | leanexplore_sqlite | leanexplore_declarations | lemma mul_subset_tensor {G H : Fact P} : (G * H : Set P) ⊆ G ⊗ H := orth_extensive _ |
83 | leanexplore_declaration | leanexplore:388742 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma one_linImpl {G : Fact P} : (1 ⊸ G) = G := by simp [linImpl_of_tensor] |
84 | leanexplore_declaration | leanexplore:388743 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma linImpl_bot {G : Fact P} : (G ⊸ ⊥) = Gᗮ := by simp [linImpl_of_tensor] |
110 | leanexplore_declaration | leanexplore:388744 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma tensor_linImpl {G H K : Fact P} : ((G ⊗ H) ⊸ K) = (G ⊸ (H ⊸ K)) := by
simp [linImpl_of_tensor] |
112 | leanexplore_declaration | leanexplore:388745 | leanexplore_sqlite | leanexplore_declarations | lemma linImpl_par {G H K : Fact P} : (G ⊸ H ⅋ K) = ((G ⊸ H) ⅋ K) := by
simp [linImpl_of_tensor, par_of_tensor] |
110 | leanexplore_declaration | leanexplore:388746 | leanexplore_sqlite | leanexplore_declarations | lemma linImpl_par' {G H K : Fact P} : (G ⊸ H ⅋ K) = (H ⅋ (G ⊸ K)) := by
rw [par_comm, linImpl_par, par_comm] |
112 | leanexplore_declaration | leanexplore:388747 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma neg_linImpl_neg {G H : Fact P} : (Gᗮ ⊸ Hᗮ) = (H ⊸ G) := by
simp [linImpl_of_tensor, tensor_comm] |
394 | leanexplore_declaration | leanexplore:388748 | leanexplore_sqlite | leanexplore_declarations | lemma linImpl_iff_implies {G H : Fact P} : p ∈ G ⊸ H ↔ imp G H p := by
rw [← SetLike.mem_coe, linImpl]
simp only [dualFact_coe, mem_dual, Set.mem_mul, SetLike.mem_coe,
forall_exists_index, and_imp]
constructor
· intro h q hq
apply of_Fact _
intro r hr
rw [mul_assoc]
exact h _ _ hq _ hr rfl
... |
149 | leanexplore_declaration | leanexplore:388749 | leanexplore_sqlite | leanexplore_declarations | /--
The with (additive conjunction) `X & Y` of two facts,
defined as the intersection of the two facts.
-/
def withh (X Y : Fact P) : Fact P := X ⊓ Y |
208 | leanexplore_declaration | leanexplore:388750 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] infix:74 " & " => withh
/--
The oplus (additive disjunction) `X ⊕ Y` of two facts,
defined as the dual of the orthogonal of the union.
-/
def oplus (X Y : Fact P) : Fact P := dualFact (X ∪ Y)⫠ |
168 | leanexplore_declaration | leanexplore:388751 | leanexplore_sqlite | leanexplore_declarations | /--
The oplus (additive disjunction) `X ⊕ Y` of two facts,
defined as the dual of the orthogonal of the union.
-/
def oplus (X Y : Fact P) : Fact P := dualFact (X ∪ Y)⫠ |
222 | leanexplore_declaration | leanexplore:388752 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] infix:74 " ⊕ " => oplus
/--
The exponential `!X` (of course) of a fact,
defined as the dual of the orthogonal of the intersection with the idempotents.
-/
def bang (X : Fact P) : Fact P := dualFact (X ∩ I)⫠ |
182 | leanexplore_declaration | leanexplore:388753 | leanexplore_sqlite | leanexplore_declarations | /--
The exponential `!X` (of course) of a fact,
defined as the dual of the orthogonal of the intersection with the idempotents.
-/
def bang (X : Fact P) : Fact P := dualFact (X ∩ I)⫠ |
222 | leanexplore_declaration | leanexplore:388754 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] prefix:100 " ! " => bang
/--
The exponential `?X` (why not) of a fact,
defined as the dual of the intersection of the orthogonal with the idempotents.
-/
def quest (X : Fact P) : Fact P := dualFact (X⫠ ∩ I) |
181 | leanexplore_declaration | leanexplore:388755 | leanexplore_sqlite | leanexplore_declarations | /--
The exponential `?X` (why not) of a fact,
defined as the dual of the intersection of the orthogonal with the idempotents.
-/
def quest (X : Fact P) : Fact P := dualFact (X⫠ ∩ I) |
139 | leanexplore_declaration | leanexplore:388756 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] prefix:100 " ʔ " => quest
/-! ### Properties of Additives -/
lemma plus_eq_with_dual : (G ⊕ H : Fact P) = (Gᗮ & Hᗮ)ᗮ := by |
119 | leanexplore_declaration | leanexplore:388757 | leanexplore_sqlite | leanexplore_declarations | lemma plus_eq_with_dual : (G ⊕ H : Fact P) = (Gᗮ & Hᗮ)ᗮ := by
apply SetLike.coe_injective
rw [oplus, withh]
aesop |
86 | leanexplore_declaration | leanexplore:388758 | leanexplore_sqlite | leanexplore_declarations | lemma with_eq_plus_dual : (G & H : Fact P) = (Gᗮ ⊕ Hᗮ)ᗮ := by simp [plus_eq_with_dual] |
88 | leanexplore_declaration | leanexplore:388759 | leanexplore_sqlite | leanexplore_declarations | lemma neg_plus {G H : Fact P} : (G ⊕ H)ᗮ = Gᗮ & Hᗮ := by rw [plus_eq_with_dual, neg_neg] |
88 | leanexplore_declaration | leanexplore:388760 | leanexplore_sqlite | leanexplore_declarations | lemma neg_with {G H : Fact P} : (G & H)ᗮ = Gᗮ ⊕ Hᗮ := by rw [with_eq_plus_dual, neg_neg] |
104 | leanexplore_declaration | leanexplore:388761 | leanexplore_sqlite | leanexplore_declarations | lemma with_comm : (G & H : Fact P) = H & G :=
SetLike.coe_injective <| by simp [withh, Set.inter_comm] |
148 | leanexplore_declaration | leanexplore:388762 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma with_assoc : ((G & H) & K : Fact P) = G & (H & K) := by
apply SetLike.coe_injective
rw [withh, coe_min]
exact Set.inter_assoc .. |
89 | leanexplore_declaration | leanexplore:388763 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma top_with : (⊤ & G : Fact P) = G := SetLike.coe_injective <| by simp [withh] |
89 | leanexplore_declaration | leanexplore:388764 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma with_top : (G & ⊤ : Fact P) = G := SetLike.coe_injective <| by simp [withh] |
84 | leanexplore_declaration | leanexplore:388765 | leanexplore_sqlite | leanexplore_declarations | lemma plus_comm : (G ⊕ H : Fact P) = H ⊕ G := by rw [oplus, Set.union_comm, ← oplus] |
96 | leanexplore_declaration | leanexplore:388766 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma plus_assoc : ((G ⊕ H) ⊕ K : Fact P) = G ⊕ (H ⊕ K) := by
simp [plus_eq_with_dual] |
77 | leanexplore_declaration | leanexplore:388767 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma zero_plus : (0 ⊕ G : Fact P) = G := by simp [plus_eq_with_dual] |
77 | leanexplore_declaration | leanexplore:388768 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma plus_zero : (G ⊕ 0 : Fact P) = G := by simp [plus_eq_with_dual] |
91 | leanexplore_declaration | leanexplore:388769 | leanexplore_sqlite | leanexplore_declarations | lemma le_plus_left {G H : Fact P} : G ≤ G ⊕ H := fun _ hx ↦
subset_dual_dual <| Or.inl hx |
92 | leanexplore_declaration | leanexplore:388770 | leanexplore_sqlite | leanexplore_declarations | lemma le_plus_right {G H : Fact P} : H ≤ G ⊕ H := fun _ hx ↦
subset_dual_dual <| Or.inr hx |
828 | leanexplore_declaration | leanexplore:388771 | leanexplore_sqlite | leanexplore_declarations | lemma tensor_distrib_plus : (G ⊗ (H ⊕ K) : Fact P) = (G ⊗ H) ⊕ (G ⊗ K) := by
refine SetLike.coe_injective <| Set.Subset.antisymm ?_ ?_
· rw [tensor, dualFact, mk_dual_coe, oplus, dualFact, mk_dual_coe]
rw [dual_dual_subset_Fact_iff, G.eq]
refine tensor_assoc_aux.trans ?_
rw [Set.mul_union, oplus, dualFa... |
137 | leanexplore_declaration | leanexplore:388772 | leanexplore_sqlite | leanexplore_declarations | lemma plus_tensor_distrib : ((H ⊕ K) ⊗ G : Fact P) = (H ⊗ G) ⊕ (K ⊗ G) := by
rw [tensor_comm, tensor_distrib_plus]; simp [tensor_comm] |
136 | leanexplore_declaration | leanexplore:388773 | leanexplore_sqlite | leanexplore_declarations | lemma par_distrib_with : (G ⅋ (H & K) : Fact P) = (G ⅋ H) & (G ⅋ K) := by
simp [par_of_tensor, with_eq_plus_dual, tensor_distrib_plus] |
124 | leanexplore_declaration | leanexplore:388774 | leanexplore_sqlite | leanexplore_declarations | lemma with_par_distrib : ((H & K) ⅋ G : Fact P) = (H ⅋ G) & (K ⅋ G) := by
rw [par_comm, par_distrib_with]; simp [par_comm] |
375 | leanexplore_declaration | leanexplore:388775 | leanexplore_sqlite | leanexplore_declarations | lemma tensor_semi_distrib_with : (G ⊗ (H & K) : Fact P) ≤ (G ⊗ H) & (G ⊗ K) := by
rw [← SetLike.coe_subset_coe]
simp only [tensor, withh, coe_min, dualFact_coe, Set.subset_inter_iff]
exact ⟨dual_subset_dual (dual_subset_dual (Set.mul_subset_mul_left Set.inter_subset_left)),
dual_subset_dual (dual_subset_... |
235 | leanexplore_declaration | leanexplore:388776 | leanexplore_sqlite | leanexplore_declarations | lemma with_tensor_semi_distrib : ((G & H) ⊗ K : Fact P) ≤ (G ⊗ K) & (H ⊗ K) :=
calc ((G & H) ⊗ K : Fact P) = K ⊗ (G & H) := by rw [tensor_comm]
_ ≤ K ⊗ G & K ⊗ H := tensor_semi_distrib_with
_ = _ := by simp only [tensor_comm] |
205 | leanexplore_declaration | leanexplore:388777 | leanexplore_sqlite | leanexplore_declarations | lemma neg_le_neg_iff {G H : Fact P} : Gᗮ ≤ Hᗮ ↔ H ≤ G := by
constructor
· intro h
rw [← neg_neg (G := H), ← neg_neg (G := G)]
exact PhaseSpace.orth_antitone h
· exact PhaseSpace.orth_antitone |
167 | leanexplore_declaration | leanexplore:388778 | leanexplore_sqlite | leanexplore_declarations | lemma par_semi_distrib_plus : ((G ⅋ H) ⊕ (G ⅋ K) : Fact P) ≤ G ⅋ (H ⊕ K) := by
rw [← neg_le_neg_iff]
simp only [neg_par, neg_plus]
exact tensor_semi_distrib_with |
435 | leanexplore_declaration | leanexplore:388779 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma top_par : (⊤ ⅋ G : Fact P) = ⊤ := by
refine SetLike.coe_injective ?_
rw [coe_top]
rw [Set.eq_univ_iff_forall]
intro x
simp only [parr, dualFact, mk_dual, mk_subset, coe_mk, coe_top]
rw [PhaseSpace.orthogonal_def, Set.mem_setOf_eq]
intro w hw
rcases Set.mem_mul.mp hw with ⟨y, hy, z, hz, rfl... |
75 | leanexplore_declaration | leanexplore:388780 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma par_top : (G ⅋ ⊤ : Fact P) = ⊤ := by
rw [par_comm, top_par] |
77 | leanexplore_declaration | leanexplore:388781 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma zero_tensor : (0 ⊗ G : Fact P) = 0 := by
simp [tensor_of_par] |
86 | leanexplore_declaration | leanexplore:388782 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma tensor_zero : (G ⊗ 0 : Fact P) = 0 := by
rw [tensor_comm, zero_tensor] |
158 | leanexplore_declaration | leanexplore:388783 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma plus_entails : ((G ⊕ H) ⊸ K : Fact P) = (G ⊸ K) & (H ⊸ K) := by
simp only [linImpl_of_tensor, with_eq_plus_dual, plus_tensor_distrib, neg_neg] |
124 | leanexplore_declaration | leanexplore:388784 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma entails_with : (G ⊸ (H & K) : Fact P) = (G ⊸ H) & (G ⊸ K) := by
simp only [linImpl_of_par, par_distrib_with] |
77 | leanexplore_declaration | leanexplore:388785 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma zero_entails : (0 ⊸ G : Fact P) = ⊤ := by simp [linImpl_of_par] |
76 | leanexplore_declaration | leanexplore:388786 | leanexplore_sqlite | leanexplore_declarations | @[simp] lemma entails_top : (G ⊸ ⊤ : Fact P) = ⊤ := by simp [linImpl_of_par] |
102 | leanexplore_declaration | leanexplore:388787 | leanexplore_sqlite | leanexplore_declarations | /--
A fact `G` is valid if the unit `1` belongs to `G`.
-/
abbrev IsValid (G : Fact P) : Prop := 1 ∈ G |
84 | leanexplore_declaration | leanexplore:388788 | leanexplore_sqlite | leanexplore_declarations | lemma valid_with {G H : Fact P} : (G & H).IsValid ↔ G.IsValid ∧ H.IsValid := Iff.rfl |
630 | leanexplore_declaration | leanexplore:388789 | leanexplore_sqlite | leanexplore_declarations | /--
The interpretation of a CLL proposition in a phase space, given a valuation of atoms to facts.
-/
def interpProp [PhaseSpace M] (v : Atom → Fact M) : Proposition Atom → Fact M
| .atom a => v a
| .atomDual a => (v a)ᗮ
| .one => 1
| .zero => 0
| .top => ⊤
| .bot ... |
103 | leanexplore_declaration | leanexplore:388790 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] scoped notation:max "⟦" P "⟧" v:90 => interpProp v P
end PhaseSpace
end CLL
end Cslib |
310 | leanexplore_declaration | leanexplore:388791 | leanexplore_sqlite | leanexplore_declarations | /-- Propositions. -/
inductive Proposition (Atom : Type u) : Type u where
/-- Propositional atoms -/
| atom (x : Atom)
/-- Conjunction -/
| and (a b : Proposition Atom)
/-- Disjunction -/
| or (a b : Proposition Atom)
/-- Implication -/
| impl (a b : Proposition Atom)
deriving DecidableEq, BEq |
46 | leanexplore_declaration | leanexplore:388792 | leanexplore_sqlite | leanexplore_declarations | /-- Propositional atoms -/
| atom (x : Atom) |
51 | leanexplore_declaration | leanexplore:388793 | leanexplore_sqlite | leanexplore_declarations | /-- Conjunction -/
| and (a b : Proposition Atom) |
50 | leanexplore_declaration | leanexplore:388794 | leanexplore_sqlite | leanexplore_declarations | /-- Disjunction -/
| or (a b : Proposition Atom) |
52 | leanexplore_declaration | leanexplore:388795 | leanexplore_sqlite | leanexplore_declarations | /-- Implication -/
| impl (a b : Proposition Atom) |
76 | leanexplore_declaration | leanexplore:388800 | leanexplore_sqlite | leanexplore_declarations | instance instBotProposition [Bot Atom] : Bot (Proposition Atom) := ⟨.atom ⊥⟩ |
62 | leanexplore_declaration | leanexplore:388801 | leanexplore_sqlite | leanexplore_declarations | instance instInhabitedOfBot [Bot Atom] : Inhabited Atom := ⟨⊥⟩ |
157 | leanexplore_declaration | leanexplore:388802 | leanexplore_sqlite | leanexplore_declarations | /-- We view negation as a defined connective ~A := A → ⊥ -/
abbrev Proposition.neg [Bot Atom] : Proposition Atom → Proposition Atom := (Proposition.impl · ⊥) |
183 | leanexplore_declaration | leanexplore:388803 | leanexplore_sqlite | leanexplore_declarations | /-- A fixed choice of a derivable proposition (of course any two are equivalent). -/
abbrev Proposition.top [Inhabited Atom] : Proposition Atom := impl (.atom default) (.atom default) |
79 | leanexplore_declaration | leanexplore:388804 | leanexplore_sqlite | leanexplore_declarations | instance instTopProposition [Inhabited Atom] : Top (Proposition Atom) := ⟨.top⟩ |
651 | leanexplore_declaration | leanexplore:388805 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] scoped infix:36 " ∧ " => Proposition.and
@[inherit_doc] scoped infix:35 " ∨ " => Proposition.or
@[inherit_doc] scoped infix:30 " → " => Proposition.impl
@[inherit_doc] scoped prefix:40 " ¬ " => Proposition.neg
/-- A function on atoms induces a function on propositions. -/
def Proposition.map {Atom Atom'... |
595 | leanexplore_declaration | leanexplore:388806 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] scoped infix:35 " ∨ " => Proposition.or
@[inherit_doc] scoped infix:30 " → " => Proposition.impl
@[inherit_doc] scoped prefix:40 " ¬ " => Proposition.neg
/-- A function on atoms induces a function on propositions. -/
def Proposition.map {Atom Atom' : Type u} (f : Atom → Atom') : Proposition Atom → Propo... |
540 | leanexplore_declaration | leanexplore:388807 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] scoped infix:30 " → " => Proposition.impl
@[inherit_doc] scoped prefix:40 " ¬ " => Proposition.neg
/-- A function on atoms induces a function on propositions. -/
def Proposition.map {Atom Atom' : Type u} (f : Atom → Atom') : Proposition Atom → Proposition Atom'
| atom x => atom (f x)
| and A B => (A... |
483 | leanexplore_declaration | leanexplore:388808 | leanexplore_sqlite | leanexplore_declarations | @[inherit_doc] scoped prefix:40 " ¬ " => Proposition.neg
/-- A function on atoms induces a function on propositions. -/
def Proposition.map {Atom Atom' : Type u} (f : Atom → Atom') : Proposition Atom → Proposition Atom'
| atom x => atom (f x)
| and A B => (A.map f) ∧ (B.map f)
| or A B => (A.map f) ∨ (B.map f)
... |
298 | leanexplore_declaration | leanexplore:388809 | leanexplore_sqlite | leanexplore_declarations | /-- A function on atoms induces a function on propositions. -/
def Proposition.map {Atom Atom' : Type u} (f : Atom → Atom') : Proposition Atom → Proposition Atom'
| atom x => atom (f x)
| and A B => (A.map f) ∧ (B.map f)
| or A B => (A.map f) ∨ (B.map f)
| impl A B => (A.map f) → (B.map f) |
302 | leanexplore_declaration | leanexplore:388810 | leanexplore_sqlite | leanexplore_declarations | instance {Atom Atom' : Type u} : FunLike (Atom → Atom') (Proposition Atom) (Proposition Atom') where
coe := Proposition.map
coe_injective' f f' h := by
ext x
have : (Proposition.atom x).map f = (Proposition.atom x).map f' :=
congrFun h (Proposition.atom x)
grind [Proposition.map] |
98 | leanexplore_declaration | leanexplore:388811 | leanexplore_sqlite | leanexplore_declarations | /-- Theories are arbitrary sets of propositions. -/
abbrev Theory (Atom) := Set (Proposition Atom) |
157 | leanexplore_declaration | leanexplore:388812 | leanexplore_sqlite | leanexplore_declarations | /-- Extend `Proposition.map` to theories. -/
def map {Atom Atom' : Type u} (f : Atom → Atom') : Theory Atom → Theory Atom' :=
Set.image (Proposition.map f) |
324 | leanexplore_declaration | leanexplore:388813 | leanexplore_sqlite | leanexplore_declarations | instance {Atom Atom' : Type u} : FunLike (Atom → Atom') (Theory Atom) (Theory Atom') where
coe := Theory.map
coe_injective' f f' h := by
ext x
have : Theory.map f {Proposition.atom x} = Theory.map f' {Proposition.atom x} :=
congrFun h {Proposition.atom x}
simpa [Theory.map, Proposition.map] using ... |
99 | leanexplore_declaration | leanexplore:388814 | leanexplore_sqlite | leanexplore_declarations | /-- The empty theory corresponds to minimal propositional logic. -/
abbrev MPL : Theory (Atom) := ∅ |
154 | leanexplore_declaration | leanexplore:388815 | leanexplore_sqlite | leanexplore_declarations | /-- Intuitionistic propositional logic adds the principle of explosion (ex falso quodlibet). -/
abbrev IPL [Bot Atom] : Theory Atom :=
Set.range (⊥ → ·) |
154 | leanexplore_declaration | leanexplore:388816 | leanexplore_sqlite | leanexplore_declarations | /-- Classical logic further adds double negation elimination. -/
abbrev CPL [Bot Atom] : Theory Atom :=
Set.range (fun (A : Proposition Atom) ↦ ¬¬A → A) |
186 | leanexplore_declaration | leanexplore:388817 | leanexplore_sqlite | leanexplore_declarations | /-- A theory is intuitionistic if it validates ex falso quodlibet. -/
@[scoped grind]
class IsIntuitionistic [Bot Atom] (T : Theory Atom) where
efq (A : Proposition Atom) : (⊥ → A) ∈ T |
117 | leanexplore_declaration | leanexplore:388818 | leanexplore_sqlite | leanexplore_declarations | @[scoped grind =]
theorem isIntuitionisticIff [Bot Atom] (T : Theory Atom) : IsIntuitionistic T ↔ IPL ⊆ T := by grind |
187 | leanexplore_declaration | leanexplore:388819 | leanexplore_sqlite | leanexplore_declarations | /-- A theory is classical if it validates double-negation elimination. -/
@[scoped grind]
class IsClassical [Bot Atom] (T : Theory Atom) where
dne (A : Proposition Atom) : (¬¬A → A) ∈ T |
107 | leanexplore_declaration | leanexplore:388820 | leanexplore_sqlite | leanexplore_declarations | @[scoped grind =]
theorem isClassicalIff [Bot Atom] (T : Theory Atom) : IsClassical T ↔ CPL ⊆ T := by grind |
125 | leanexplore_declaration | leanexplore:388821 | leanexplore_sqlite | leanexplore_declarations | instance instIsIntuitionisticIPL [Bot Atom] : IsIntuitionistic (Atom := Atom) IPL where
efq A := Set.mem_range.mpr ⟨A, rfl⟩ |
115 | leanexplore_declaration | leanexplore:388822 | leanexplore_sqlite | leanexplore_declarations | instance instIsClassicalCPL [Bot Atom] : IsClassical (Atom := Atom) CPL where
dne A := Set.mem_range.mpr ⟨A, rfl⟩ |
159 | leanexplore_declaration | leanexplore:388823 | leanexplore_sqlite | leanexplore_declarations | @[scoped grind →]
theorem instIsIntuitionisticExtention [Bot Atom] {T T' : Theory Atom} [IsIntuitionistic T]
(h : T ⊆ T') : IsIntuitionistic T' := by grind |
144 | leanexplore_declaration | leanexplore:388824 | leanexplore_sqlite | leanexplore_declarations | @[scoped grind →]
theorem instIsClassicalExtention [Bot Atom] {T T' : Theory Atom} [IsClassical T] (h : T ⊆ T') :
IsClassical T' := by grind |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.