Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 70269f3

Browse files
awainversejcommelin
andcommitted
feat(order/*): introduces complemented lattices (#5747)
Defines `is_complemented` on bounded lattices Proves facts about complemented modular lattices Provides two instances of `is_complemented` on submodule lattices Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Aaron Anderson <65780815+awainverse@users.noreply.github.com>
1 parent 5391433 commit 70269f3

File tree

6 files changed

+107
-2
lines changed

6 files changed

+107
-2
lines changed

src/linear_algebra/basis.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,9 @@ lemma submodule.exists_is_compl (p : submodule K V) : ∃ q : submodule K V, is_
482482
let ⟨f, hf⟩ := p.subtype.exists_left_inverse_of_injective p.ker_subtype in
483483
⟨f.ker, linear_map.is_compl_of_proj $ linear_map.ext_iff.1 hf⟩
484484

485+
instance vector_space.submodule.is_complemented : is_complemented (submodule K V) :=
486+
⟨submodule.exists_is_compl⟩
487+
485488
lemma linear_map.exists_right_inverse_of_surjective (f : V →ₗ[K] V')
486489
(hf_surj : f.range = ⊤) : ∃g:V' →ₗ V, f.comp g = linear_map.id :=
487490
begin

src/order/atoms.lean

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ which are lattices with only two elements, and related ideas.
4040
of `is_atom` and `is_coatom`.
4141
* `is_simple_lattice_iff_is_atom_top` and `is_simple_lattice_iff_is_coatom_bot` express the
4242
connection between atoms, coatoms, and simple lattices
43+
* `is_compl.is_atom_iff_is_coatom` and `is_compl.is_coatom_if_is_atom`: In a modular
44+
bounded lattice, a complement of an atom is a coatom and vice versa.
45+
* ``is_atomic_iff_is_coatomic`: A modular complemented lattice is atomic iff it is coatomic.
4346
4447
-/
4548

@@ -456,4 +459,26 @@ lemma is_coatom_iff_is_atom : is_coatom a ↔ is_atom b := hc.symm.is_atom_iff_i
456459

457460
end is_compl
458461

462+
variables [is_complemented α]
463+
464+
lemma is_coatomic_of_is_atomic_of_is_complemented_of_is_modular [is_atomic α] : is_coatomic α :=
465+
⟨λ x, begin
466+
rcases exists_is_compl x with ⟨y, xy⟩,
467+
apply (eq_bot_or_exists_atom_le y).imp _ _,
468+
{ rintro rfl,
469+
exact eq_top_of_is_compl_bot xy },
470+
{ rintro ⟨a, ha, ay⟩,
471+
rcases exists_is_compl (xy.symm.Iic_order_iso_Ici ⟨a, ay⟩) with ⟨⟨b, xb⟩, hb⟩,
472+
refine ⟨↑(⟨b, xb⟩ : set.Ici x), is_coatom.of_is_coatom_coe_Ici _, xb⟩,
473+
rw [← hb.is_atom_iff_is_coatom, order_iso.is_atom_iff],
474+
apply ha.Iic }
475+
end
476+
477+
lemma is_atomic_of_is_coatomic_of_is_complemented_of_is_modular [is_coatomic α] : is_atomic α :=
478+
is_coatomic_dual_iff_is_atomic.1 is_coatomic_of_is_atomic_of_is_complemented_of_is_modular
479+
480+
theorem is_atomic_iff_is_coatomic : is_atomic α ↔ is_coatomic α :=
481+
⟨λ h, @is_coatomic_of_is_atomic_of_is_complemented_of_is_modular _ _ _ _ h,
482+
λ h, @is_atomic_of_is_coatomic_of_is_complemented_of_is_modular _ _ _ _ h⟩
483+
459484
end is_modular_lattice

src/order/boolean_algebra.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ by rw [sdiff_eq, sdiff_eq]; from inf_le_inf h₁ (compl_le_compl h₂)
119119
@[simp] lemma sdiff_idem_right : x \ y \ y = x \ y :=
120120
by rw [sdiff_eq, sdiff_eq, inf_assoc, inf_idem]
121121

122+
namespace boolean_algebra
123+
124+
@[priority 100]
125+
instance : is_complemented α := ⟨λ x, ⟨xᶜ, is_compl_compl⟩⟩
126+
127+
end boolean_algebra
128+
122129
end boolean_algebra
123130

124131
instance boolean_algebra_Prop : boolean_algebra Prop :=

src/order/bounded_lattice.lean

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,39 @@ is_compl.of_eq bot_inf_eq sup_top_eq
10891089
lemma is_compl_top_bot [bounded_lattice α] : is_compl (⊤ : α) ⊥ :=
10901090
is_compl.of_eq inf_bot_eq top_sup_eq
10911091

1092+
section
1093+
variables [bounded_lattice α] {x : α}
1094+
1095+
lemma eq_top_of_is_compl_bot (h : is_compl x ⊥) : x = ⊤ :=
1096+
sup_bot_eq.symm.trans h.sup_eq_top
1097+
1098+
lemma eq_top_of_bot_is_compl (h : is_compl ⊥ x) : x = ⊤ :=
1099+
eq_top_of_is_compl_bot h.symm
1100+
1101+
lemma eq_bot_of_is_compl_top (h : is_compl x ⊤) : x = ⊥ :=
1102+
eq_top_of_is_compl_bot h.to_order_dual
1103+
1104+
lemma eq_bot_of_top_is_compl (h : is_compl ⊤ x) : x = ⊥ :=
1105+
eq_top_of_bot_is_compl h.to_order_dual
1106+
1107+
end
1108+
1109+
/-- A complemented bounded lattice is one where every element has a
1110+
(not necessarily unique) complement. -/
1111+
class is_complemented (α) [bounded_lattice α] : Prop :=
1112+
(exists_is_compl : ∀ (a : α), ∃ (b : α), is_compl a b)
1113+
1114+
export is_complemented (exists_is_compl)
1115+
1116+
namespace is_complemented
1117+
variables [bounded_lattice α] [is_complemented α]
1118+
1119+
instance : is_complemented (order_dual α) :=
1120+
⟨λ a, ⟨classical.some (@exists_is_compl α _ _ a),
1121+
(classical.some_spec (@exists_is_compl α _ _ a)).to_order_dual⟩⟩
1122+
1123+
end is_complemented
1124+
10921125
end is_compl
10931126

10941127
section nontrivial

src/order/modular_lattice.lean

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,31 @@ instance is_modular_lattice_Iic : is_modular_lattice (set.Iic a) :=
107107
instance is_modular_lattice_Ici : is_modular_lattice (set.Ici a) :=
108108
⟨λ x y z xz, (sup_inf_le_assoc_of_le (y : α) xz : (↑x ⊔ ↑y) ⊓ ↑z ≤ ↑x ⊔ ↑y ⊓ ↑z)⟩
109109

110+
section is_complemented
111+
variables [is_complemented α]
112+
113+
instance is_complemented_Iic : is_complemented (set.Iic a) :=
114+
⟨λ ⟨x, hx⟩, ⟨⟨(classical.some (exists_is_compl x)) ⊓ a, set.mem_Iic.2 inf_le_right⟩, begin
115+
split,
116+
{ change x ⊓ (classical.some _ ⊓ a) ≤ ⊥, -- improve lattice subtype API
117+
rw ← inf_assoc,
118+
exact le_trans inf_le_left (classical.some_spec (exists_is_compl x)).1 },
119+
{ change a ≤ x ⊔ (classical.some _ ⊓ a), -- improve lattice subtype API
120+
rw [← sup_inf_assoc_of_le _ (set.mem_Iic.1 hx),
121+
top_le_iff.1 (classical.some_spec (exists_is_compl x)).2, top_inf_eq] }
122+
end⟩⟩
123+
124+
instance is_complemented_Ici : is_complemented (set.Ici a) :=
125+
⟨λ ⟨x, hx⟩, ⟨⟨(classical.some (exists_is_compl x)) ⊔ a, set.mem_Ici.2 le_sup_right⟩, begin
126+
split,
127+
{ change x ⊓ (classical.some _ ⊔ a) ≤ a, -- improve lattice subtype API
128+
rw [← inf_sup_assoc_of_le _ (set.mem_Ici.1 hx),
129+
le_bot_iff.1 (classical.some_spec (exists_is_compl x)).1, bot_sup_eq] },
130+
{ change ⊤ ≤ x ⊔ (classical.some _ ⊔ a), -- improve lattice subtype API
131+
rw ← sup_assoc,
132+
exact le_trans (classical.some_spec (exists_is_compl x)).2 le_sup_left }
133+
end⟩⟩
134+
135+
end is_complemented
136+
110137
end is_modular_lattice

src/representation_theory/maschke.lean

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ end
136136
end linear_map
137137
end
138138

139+
namespace monoid_algebra
140+
139141
-- Now we work over a `[field k]`, and replace the assumption `[invertible (fintype.card G : k)]`
140142
-- with `¬(ring_char k ∣ fintype.card G)`.
141143
variables {k : Type u} [field k] {G : Type u} [fintype G] [group G]
@@ -144,7 +146,7 @@ variables [is_scalar_tower k (monoid_algebra k G) V]
144146
variables {W : Type u} [add_comm_group W] [module k W] [module (monoid_algebra k G) W]
145147
variables [is_scalar_tower k (monoid_algebra k G) W]
146148

147-
lemma monoid_algebra.exists_left_inverse_of_injective
149+
lemma exists_left_inverse_of_injective
148150
(not_dvd : ¬(ring_char k ∣ fintype.card G)) (f : V →ₗ[monoid_algebra k G] W) (hf : f.ker = ⊥) :
149151
∃ (g : W →ₗ[monoid_algebra k G] V), g.comp f = linear_map.id :=
150152
begin
@@ -161,8 +163,16 @@ begin
161163
exact congr_fun this v
162164
end
163165

164-
lemma monoid_algebra.submodule.exists_is_compl
166+
namespace submodule
167+
168+
lemma exists_is_compl
165169
(not_dvd : ¬(ring_char k ∣ fintype.card G)) (p : submodule (monoid_algebra k G) V) :
166170
∃ q : submodule (monoid_algebra k G) V, is_compl p q :=
167171
let ⟨f, hf⟩ := monoid_algebra.exists_left_inverse_of_injective not_dvd p.subtype p.ker_subtype in
168172
⟨f.ker, linear_map.is_compl_of_proj $ linear_map.ext_iff.1 hf⟩
173+
174+
theorem is_complemented (not_dvd : ¬(ring_char k ∣ fintype.card G)) :
175+
is_complemented (submodule (monoid_algebra k G) V) := ⟨exists_is_compl not_dvd⟩
176+
177+
end submodule
178+
end monoid_algebra

0 commit comments

Comments
 (0)