Skip to content

Commit f5ac708

Browse files
committed
wip
1 parent 0a1e6fd commit f5ac708

2 files changed

Lines changed: 153 additions & 1 deletion

File tree

Foundation/Vorspiel/Order/Heyting.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ lemma himp_inf_himp_inf_sup_le (a b c : α) : (a ⇨ c) ⊓ (b ⇨ c) ⊓ (a ⊔
4040
simpa only [GeneralizedHeytingAlgebra.le_himp_iff, inf_comm (a ⊔ b)] using this
4141

4242
end HeytingAlgebra
43+
44+
namespace CompleteBooleanAlgebra
45+
46+
variable {α : Type*} [CompleteBooleanAlgebra α]
47+
48+
49+
50+
end CompleteBooleanAlgebra

Foundation/Vorspiel/Order/Ideal.lean

Lines changed: 145 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ module
44
public import Mathlib.Order.Ideal
55
public import Mathlib.Order.PFilter
66
public import Mathlib.Data.Finset.Lattice.Basic
7+
public import Mathlib.Order.PrimeIdeal
78

89
@[expose] public section
910

1011
namespace Order
1112

1213
namespace Ideal
1314

14-
variable {P : Type*} [SemilatticeSup P] [OrderBot P]
15+
variable {P : Type*}
16+
17+
section semilatticeSup
18+
19+
variable [SemilatticeSup P] [OrderBot P]
1520

1621
lemma sSup_def (s : Set (Ideal P)) : sSup s = sInf (upperBounds s) := rfl
1722

@@ -60,6 +65,145 @@ lemma mem_iSup_iff [DecidableEq ι] {I : ι → Ideal P} {x : P} :
6065
intro i x hx
6166
refine ⟨{i}, by simpa using hx⟩
6267

68+
end semilatticeSup
69+
70+
section completeSemilatticeSup
71+
72+
variable [CompleteSemilatticeSup P]
73+
74+
theorem sSup_mem {s : Set P} {I : Ideal P} :
75+
sSup s ∈ I → ∀ x ∈ s, x ∈ I := fun h _ hx ↦
76+
I.lower (le_sSup_iff.mpr fun _ a ↦ a hx) h
77+
78+
end completeSemilatticeSup
79+
6380
end Ideal
6481

82+
namespace Ideal.IsProper
83+
84+
variable {P : Type*} [SemilatticeSup P]
85+
86+
lemma iff_top_not_mem [OrderTop P] {I : Ideal P} : I.IsProper ↔ ⊤ ∉ I := by
87+
constructor
88+
· intro h ht
89+
have : (I : Set P) = Set.univ := by
90+
ext x
91+
suffices x ∈ I by simpa
92+
exact I.lower (show x ≤ ⊤ by simp) ht
93+
exact h.ne_univ this
94+
· intro hn
95+
refine ⟨?_⟩
96+
intro e
97+
have : ⊤ ∈ I :=
98+
SetLike.mem_coe.mp <| by rw [e]; simp
99+
contradiction
100+
101+
@[simp] lemma top_not_mem [OrderTop P] (I : Ideal P) [I.IsProper] : ⊤ ∉ I :=
102+
iff_top_not_mem.mp inferInstance
103+
104+
end Ideal.IsProper
105+
106+
namespace Ideal.PrimePair
107+
108+
variable {P : Type*}
109+
110+
open IsPrime
111+
112+
section booleanAlgebra
113+
114+
section basic
115+
116+
variable [Preorder P] (IF : PrimePair P)
117+
118+
lemma not_mem_F_iff_mem_I {x : P} :
119+
x ∉ IF.F ↔ x ∈ IF.I := by
120+
have : x ∈ IF.I ∨ x ∈ IF.F := by simpa using Set.ext_iff.mp IF.I_union_F x
121+
have : x ∈ IF.I → x ∉ IF.F := @Set.disjoint_left.mp IF.disjoint x
122+
tauto
123+
124+
lemma not_mem_I_iff_mem_F {x : P} :
125+
x ∉ IF.I ↔ x ∈ IF.F := by
126+
have : x ∈ IF.I ∨ x ∈ IF.F := by simpa using Set.ext_iff.mp IF.I_union_F x
127+
have : x ∈ IF.F → x ∉ IF.I := @Set.disjoint_right.mp IF.disjoint x
128+
tauto
129+
130+
abbrev IsProper : Prop := IF.I.IsProper
131+
132+
instance i_isProper (IF : PrimePair P) [IF.IsProper] : IF.I.IsProper := inferInstance
133+
134+
instance : IF.I.IsPrime := I_isPrime IF
135+
136+
end basic
137+
138+
variable [BooleanAlgebra P] {IF : PrimePair P}
139+
140+
lemma mem_or_compl_mem_I (x : P) : x ∈ IF.I ∨ xᶜ ∈ IF.I :=
141+
IF.I_isPrime.mem_or_compl_mem
142+
143+
lemma mem_or_compl_mem_F (x : P) : x ∈ IF.F ∨ xᶜ ∈ IF.F := by
144+
by_contra!
145+
have hx : x ∈ IF.I := by simpa [not_mem_F_iff_mem_I] using this.1
146+
have hxc : xᶜ ∈ IF.I := by simpa [not_mem_F_iff_mem_I] using this.2
147+
have : ⊤ ∈ IF.I := by simpa using Order.Ideal.sup_mem hx hxc
148+
have : ⊤ ∉ IF.I := Ideal.IsProper.top_not_mem IF.I
149+
contradiction
150+
151+
lemma compl_mem_I_iff_mem_F :
152+
xᶜ ∈ IF.I ↔ x ∈ IF.F := by
153+
constructor
154+
· have : x ∈ IF.F ∨ xᶜ ∉ IF.I := by simpa [not_mem_I_iff_mem_F] using mem_or_compl_mem_F x
155+
tauto
156+
· have : x ∉ IF.F ∨ xᶜ ∈ IF.I := by simpa [not_mem_F_iff_mem_I] using mem_or_compl_mem_I x
157+
tauto
158+
159+
lemma compl_mem_F_iff_mem_I :
160+
xᶜ ∈ IF.F ↔ x ∈ IF.I := by
161+
simpa using (compl_mem_I_iff_mem_F (x := xᶜ)).symm
162+
163+
@[simp] lemma inf_mem_I_iff {x y : P} :
164+
x ⊓ y ∈ IF.I ↔ x ∈ IF.I ∨ y ∈ IF.I := by
165+
constructor
166+
· exact mem_or_mem (I_isPrime IF)
167+
· rintro (h | h)
168+
· exact IF.I.lower (by simp) h
169+
· exact IF.I.lower (by simp) h
170+
171+
@[simp] lemma sup_mem_F_iff {x y : P} :
172+
x ⊔ y ∈ IF.F ↔ x ∈ IF.F ∨ y ∈ IF.F := by
173+
simp [←compl_mem_I_iff_mem_F]
174+
175+
@[simp] lemma himp_mem_F_iff {x y : P} :
176+
x ⇨ y ∈ IF.F ↔ (x ∈ IF.F → y ∈ IF.F) := by
177+
simp [himp_eq, compl_mem_F_iff_mem_I, ←not_mem_F_iff_mem_I]
178+
tauto
179+
180+
end booleanAlgebra
181+
182+
section completeBooleanAlgebra
183+
184+
variable [CompleteBooleanAlgebra P] {IF : PrimePair P}
185+
186+
lemma iSup_mem_iff {f : ι → P} :
187+
⨆ i, f i ∈ IF.I ↔ ∀ i, f i ∈ IF.I := by
188+
constructor
189+
· intro h i
190+
exact IF.I.lower (le_iSup f i) h
191+
· intro h
192+
by_contra! hf
193+
194+
195+
lemma iInf_mem_iff {f : ι → P} :
196+
⨅ i, f i ∈ IF.I ↔ ∃ i, f i ∈ IF.I := by
197+
constructor
198+
· intro h
199+
by_contra! hf
200+
201+
202+
end completeBooleanAlgebra
203+
204+
end Ideal.IsPrime
205+
206+
207+
208+
65209
end Order

0 commit comments

Comments
 (0)