1-- Complete lattices, arbitrary suprema and infima, and the powerset lattice2-- Part of Cumulus, the Grace17 mathematics library.3-- Copyright (c) 2026 Grant Passmore.4-- Released under the Apache License 2.0. See LICENSE in the repository root.5-- Authors: Grant Passmore67module Grace.Cumulus.Lattice.Complete8import Bounded910predicate IsCompleteLattice (A r : Set) :=11 IsPartialOrder(A, r) ∧ (∀ S, S ⊆ A →∃ s, Supremum(A, r, S, s))1213def lowerBoundsOf (A r S : Set) : Set:= { b ∈ A | LowerBound(A, r, S, b) }14def upperBoundsOf (A r S : Set) : Set:= { b ∈ A | UpperBound(A, r, S, b) }1516theorem lowerBoundsOf.subset (A r S : Set)17shows lowerBoundsOf(A, r, S) ⊆ A18proof19intros b hb20have member := lowerBoundsOf.membership.forward with hb21exact member.left2223theorem upperBoundsOf.subset (A r S : Set)24shows upperBoundsOf(A, r, S) ⊆ A25proof26intros b hb27have member := upperBoundsOf.membership.forward with hb28exact member.left2930theorem IsCompleteLattice.order (A r : Set)31requires h : IsCompleteLattice(A, r)32shows IsPartialOrder(A, r)33proof34simp [IsCompleteLattice]3536theorem IsCompleteLattice.exists_supremum (A r S : Set)37requires h : IsCompleteLattice(A, r)38requires hS : S ⊆ A39shows∃ s, Supremum(A, r, S, s)40proof41rcases h with⟨order, suprema⟩42exact suprema with S, hS4344-- The infimum of S is the supremum of its lower bounds.4546theorem IsCompleteLattice.exists_infimum (A r S : Set)47requires h : IsCompleteLattice(A, r)48requires hS : S ⊆ A49shows∃ i, Infimum(A, r, S, i)50proof51have lowerSubset := lowerBoundsOf.subset at A, r, S52obtain⟨s, hs⟩:= IsCompleteLattice.exists_supremum with h, lowerSubset53have sA := Supremum.member with hs54witness s55constructor56 . refine⟨sA, hS, ?_⟩57intros x hx58have xA := hS with x, hx59have bound : UpperBound(A, r, lowerBoundsOf(A, r, S), x)60refine⟨xA, lowerSubset, ?_⟩61intros b hb62have member := lowerBoundsOf.membership.forward with hb63exact LowerBound.below with member.right, hx64exact Supremum.least with hs, xA, bound65 . intros b hb bound66have member : b ∈ lowerBoundsOf(A, r, S) :=67 lowerBoundsOf.membership.backward with⟨hb, bound⟩68exact Supremum.above with hs, member6970-- Dually, a partial order with all infima has all suprema.7172theorem IsCompleteLattice.of_infima (A r : Set)73requires order : IsPartialOrder(A, r)74requires infima : ∀ S, S ⊆ A →∃ i, Infimum(A, r, S, i)75shows IsCompleteLattice(A, r)76proof77constructor78 . exact order79 . intros S hS80have upperSubset := upperBoundsOf.subset at A, r, S81obtain⟨i, hi⟩:= infima with upperBoundsOf(A, r, S), upperSubset82have iA := Infimum.member with hi83witness i84constructor85 . refine⟨iA, hS, ?_⟩86intros x hx87have xA := hS with x, hx88have bound : LowerBound(A, r, upperBoundsOf(A, r, S), x)89refine⟨xA, upperSubset, ?_⟩90intros b hb91have member := upperBoundsOf.membership.forward with hb92exact UpperBound.above with member.right, hx93exact Infimum.greatest with hi, xA, bound94 . intros b hb bound95have member : b ∈ upperBoundsOf(A, r, S) :=96 upperBoundsOf.membership.backward with⟨hb, bound⟩97exact Infimum.below with hi, member9899theorem IsCompleteLattice.lattice (A r : Set)100requires h : IsCompleteLattice(A, r)101shows IsLattice(A, r)102proof103apply IsLattice.of_pairs with (IsCompleteLattice.order with h)104 . intros x hx y hy105have bounded : {x, y} ⊆ A bysimp106exact IsCompleteLattice.exists_supremum with h, bounded107 . intros x hx y hy108have bounded : {x, y} ⊆ A bysimp109exact IsCompleteLattice.exists_infimum with h, bounded110111theorem IsCompleteLattice.converse (A r : Set)112requires h : IsCompleteLattice(A, r)113shows IsCompleteLattice(A, converse(r, A, A))114proof115have order := IsCompleteLattice.order with h116apply IsCompleteLattice.of_infima with (IsPartialOrder.converse with order)117intros S hS118obtain⟨s, hs⟩:= IsCompleteLattice.exists_supremum with h, hS119refine⟨s, Supremum.converse with hs⟩120121-- The supremum and infimum of a subset122123defunique supremum (A r S : Set) (s ∈ A) := Supremum(A, r, S, s)124requires complete : IsCompleteLattice(A, r)125requires hS : S ⊆ A126proof127obtain⟨s, hs⟩:= IsCompleteLattice.exists_supremum with complete, hS128witness s129refine⟨Supremum.member with hs, hs⟩130uniqueness131intros s sA first t tA second132exact Supremum.unique with (IsCompleteLattice.order with complete), first,133 second134135defunique infimum (A r S : Set) (i ∈ A) := Infimum(A, r, S, i)136requires complete : IsCompleteLattice(A, r)137requires hS : S ⊆ A138proof139obtain⟨i, hi⟩:= IsCompleteLattice.exists_infimum with complete, hS140witness i141refine⟨Infimum.member with hi, hi⟩142uniqueness143intros i iA first j jA second144exact Infimum.unique with (IsCompleteLattice.order with complete), first,145 second146147theorem supremum.member (A r S : Set)148requires complete : IsCompleteLattice(A, r)149requires hS : S ⊆ A150shows supremum(A, r, S) ∈ A151proof152have selected := supremum.selected with complete, hS153exact selected.left154155theorem supremum.supremum (A r S : Set)156requires complete : IsCompleteLattice(A, r)157requires hS : S ⊆ A158shows Supremum(A, r, S, supremum(A, r, S))159proof160have selected := supremum.selected with complete, hS161exact selected.right162163theorem supremum.upper (A r S : Set)164requires complete : IsCompleteLattice(A, r)165requires hS : S ⊆ A166shows UpperBound(A, r, S, supremum(A, r, S))167proof168exact Supremum.upper with (supremum.supremum with complete, hS)169170theorem supremum.above (A r S x : Set)171requires complete : IsCompleteLattice(A, r)172requires hS : S ⊆ A173requires hx : x ∈ S174shows relates(r, x, supremum(A, r, S))175proof176exact Supremum.above with (supremum.supremum with complete, hS), hx177178theorem supremum.least (A r S b : Set)179requires complete : IsCompleteLattice(A, r)180requires hS : S ⊆ A181requires hb : b ∈ A182requires bound : UpperBound(A, r, S, b)183shows relates(r, supremum(A, r, S), b)184proof185exact Supremum.least with (supremum.supremum with complete, hS), hb, bound186187theorem supremum.of_supremum (A r S s : Set)188requires complete : IsCompleteLattice(A, r)189requires hS : S ⊆ A190requires h : Supremum(A, r, S, s)191shows s = supremum(A, r, S)192proof193have order := IsCompleteLattice.order with complete194exact Supremum.unique with order, h, (supremum.supremum with complete, hS)195196theorem supremum.le_iff (A r S b : Set)197requires complete : IsCompleteLattice(A, r)198requires hS : S ⊆ A199requires hb : b ∈ A200shows relates(r, supremum(A, r, S), b) ↔∀ x ∈ S, relates(r, x, b)201proof202have order := IsCompleteLattice.order with complete203have transitive := IsPartialOrder.transitive with order204have supA := supremum.member with complete, hS205constructor206 . intros below x hx207have above := supremum.above with complete, hS, hx208exact transitive with x, (hS with x, hx), supremum(A, r, S), supA, b, hb,209 above, below210 . intro bounds211exact supremum.least with complete, hS, hb, ⟨hb, hS, bounds⟩212213theorem infimum.member (A r S : Set)214requires complete : IsCompleteLattice(A, r)215requires hS : S ⊆ A216shows infimum(A, r, S) ∈ A217proof218have selected := infimum.selected with complete, hS219exact selected.left220221theorem infimum.infimum (A r S : Set)222requires complete : IsCompleteLattice(A, r)223requires hS : S ⊆ A224shows Infimum(A, r, S, infimum(A, r, S))225proof226have selected := infimum.selected with complete, hS227exact selected.right228229theorem infimum.lower (A r S : Set)230requires complete : IsCompleteLattice(A, r)231requires hS : S ⊆ A232shows LowerBound(A, r, S, infimum(A, r, S))233proof234exact Infimum.lower with (infimum.infimum with complete, hS)235236theorem infimum.below (A r S x : Set)237requires complete : IsCompleteLattice(A, r)238requires hS : S ⊆ A239requires hx : x ∈ S240shows relates(r, infimum(A, r, S), x)241proof242exact Infimum.below with (infimum.infimum with complete, hS), hx243244theorem infimum.greatest (A r S b : Set)245requires complete : IsCompleteLattice(A, r)246requires hS : S ⊆ A247requires hb : b ∈ A248requires bound : LowerBound(A, r, S, b)249shows relates(r, b, infimum(A, r, S))250proof251exact Infimum.greatest with (infimum.infimum with complete, hS), hb, bound252253theorem infimum.of_infimum (A r S i : Set)254requires complete : IsCompleteLattice(A, r)255requires hS : S ⊆ A256requires h : Infimum(A, r, S, i)257shows i = infimum(A, r, S)258proof259have order := IsCompleteLattice.order with complete260exact Infimum.unique with order, h, (infimum.infimum with complete, hS)261262theorem infimum.ge_iff (A r S b : Set)263requires complete : IsCompleteLattice(A, r)264requires hS : S ⊆ A265requires hb : b ∈ A266shows relates(r, b, infimum(A, r, S)) ↔∀ x ∈ S, relates(r, b, x)267proof268have order := IsCompleteLattice.order with complete269have transitive := IsPartialOrder.transitive with order270have infA := infimum.member with complete, hS271constructor272 . intros above x hx273have below := infimum.below with complete, hS, hx274exact transitive with b, hb, infimum(A, r, S), infA, x, (hS with x, hx),275 above, below276 . intro bounds277exact infimum.greatest with complete, hS, hb, ⟨hb, hS, bounds⟩278279-- Monotonicity, pairs, singletons, the empty set, and the whole points280281theorem supremum.monotone (A r S T : Set)282requires complete : IsCompleteLattice(A, r)283requires hST : S ⊆ T284requires hT : T ⊆ A285shows relates(r, supremum(A, r, S), supremum(A, r, T))286proof287have hS := Subset.transitive with hST, hT288have supS := supremum.supremum with complete, hS289have supT := supremum.supremum with complete, hT290exact Supremum.monotone with hST, supS, supT291292theorem infimum.antitone (A r S T : Set)293requires complete : IsCompleteLattice(A, r)294requires hST : S ⊆ T295requires hT : T ⊆ A296shows relates(r, infimum(A, r, T), infimum(A, r, S))297proof298have hS := Subset.transitive with hST, hT299have infS := infimum.infimum with complete, hS300have infT := infimum.infimum with complete, hT301exact Infimum.antitone with hST, infS, infT302303theorem supremum.pair (A r x y : Set)304requires complete : IsCompleteLattice(A, r)305requires hx : x ∈ A306requires hy : y ∈ A307shows supremum(A, r, {x, y}) = join(A, r, x, y)308proof309have lattice := IsCompleteLattice.lattice with complete310have bounded : {x, y} ⊆ A bysimp311have supremum := supremum.supremum with complete, bounded312exact join.of_supremum with lattice, hx, hy, supremum313314theorem infimum.pair (A r x y : Set)315requires complete : IsCompleteLattice(A, r)316requires hx : x ∈ A317requires hy : y ∈ A318shows infimum(A, r, {x, y}) = meet(A, r, x, y)319proof320have lattice := IsCompleteLattice.lattice with complete321have bounded : {x, y} ⊆ A bysimp322have infimum := infimum.infimum with complete, bounded323exact meet.of_infimum with lattice, hx, hy, infimum324325theorem supremum.singleton (A r x : Set)326requires complete : IsCompleteLattice(A, r)327requires hx : x ∈ A328shows supremum(A, r, {x}) = x329proof330have order := IsCompleteLattice.order with complete331have bounded : {x} ⊆ A bysimp332 symm333exact supremum.of_supremum with complete, bounded,334 (Supremum.singleton with order, hx)335336theorem infimum.singleton (A r x : Set)337requires complete : IsCompleteLattice(A, r)338requires hx : x ∈ A339shows infimum(A, r, {x}) = x340proof341have order := IsCompleteLattice.order with complete342have bounded : {x} ⊆ A bysimp343 symm344exact infimum.of_infimum with complete, bounded,345 (Infimum.singleton with order, hx)346347theorem supremum.empty (A r : Set)348requires complete : IsCompleteLattice(A, r)349shows Least(A, r, A, supremum(A, r, ∅))350proof351have supremum := supremum.supremum with complete, (empty.subset at A)352exact Supremum.empty_iff.forward with supremum353354theorem infimum.empty (A r : Set)355requires complete : IsCompleteLattice(A, r)356shows Greatest(A, r, A, infimum(A, r, ∅))357proof358have infimum := infimum.infimum with complete, (empty.subset at A)359exact Infimum.empty_iff.forward with infimum360361theorem supremum.whole (A r : Set)362requires complete : IsCompleteLattice(A, r)363shows Greatest(A, r, A, supremum(A, r, A))364proof365have supremum := supremum.supremum with complete, (Subset.reflexive at A)366exact Supremum.whole_iff.forward with supremum367368theorem infimum.whole (A r : Set)369requires complete : IsCompleteLattice(A, r)370shows Least(A, r, A, infimum(A, r, A))371proof372have infimum := infimum.infimum with complete, (Subset.reflexive at A)373exact Infimum.whole_iff.forward with infimum374375theorem IsCompleteLattice.bounded (A r : Set)376requires complete : IsCompleteLattice(A, r)377shows IsBoundedLattice(A, r, supremum(A, r, ∅), supremum(A, r, A))378proof379have lattice := IsCompleteLattice.lattice with complete380exact IsBoundedLattice.of_bounds with lattice, (supremum.empty with complete),381 (supremum.whole with complete)382383theorem IsCompleteLattice.nonempty (A r : Set)384requires complete : IsCompleteLattice(A, r)385shows Nonempty(A)386proof387exact IsBoundedLattice.nonempty with (IsCompleteLattice.bounded with complete)388389theorem supremum.union2 (A r S T : Set)390requires complete : IsCompleteLattice(A, r)391requires hS : S ⊆ A392requires hT : T ⊆ A393shows supremum(A, r, S ∪ T) = join(A, r, supremum(A, r, S), supremum(A, r, T))394proof395have lattice := IsCompleteLattice.lattice with complete396have transitive := IsLattice.transitive with lattice397have hST := union2.subset with hS, hT398have supS := supremum.member with complete, hS399have supT := supremum.member with complete, hT400have joinA := join.member with lattice, supS, supT401have sJ := join.upper_left with lattice, supS, supT402have tJ := join.upper_right with lattice, supS, supT403have result : Supremum(A, r, S ∪ T, join(A, r, supremum(A, r, S),404 supremum(A, r, T)))405constructor406 . refine⟨joinA, hST, ?_⟩407intros x hx408havecases:= union2.membership.forward with hx409casescaseswith xS | xT410 . have above := supremum.above with complete, hS, xS411exact transitive with x, (hS with x, xS), supremum(A, r, S), supS,412 join(A, r, supremum(A, r, S), supremum(A, r, T)), joinA, above, sJ413 . have above := supremum.above with complete, hT, xT414exact transitive with x, (hT with x, xT), supremum(A, r, T), supT,415 join(A, r, supremum(A, r, S), supremum(A, r, T)), joinA, above, tJ416 . intros b hb bound417have boundS := UpperBound.antitone with (union2.subset_left at S, T),418 bound419have boundT := UpperBound.antitone with (union2.subset_right at S, T),420 bound421have sb := supremum.least with complete, hS, hb, boundS422have tb := supremum.least with complete, hT, hb, boundT423exact join.least with lattice, supS, supT, hb, sb, tb424 symm425exact supremum.of_supremum with complete, hST, result426427theorem infimum.union2 (A r S T : Set)428requires complete : IsCompleteLattice(A, r)429requires hS : S ⊆ A430requires hT : T ⊆ A431shows infimum(A, r, S ∪ T) = meet(A, r, infimum(A, r, S), infimum(A, r, T))432proof433have lattice := IsCompleteLattice.lattice with complete434have transitive := IsLattice.transitive with lattice435have hST := union2.subset with hS, hT436have infS := infimum.member with complete, hS437have infT := infimum.member with complete, hT438have meetA := meet.member with lattice, infS, infT439have mS := meet.lower_left with lattice, infS, infT440have mT := meet.lower_right with lattice, infS, infT441have result : Infimum(A, r, S ∪ T, meet(A, r, infimum(A, r, S), infimum(A,442 r, T)))443constructor444 . refine⟨meetA, hST, ?_⟩445intros x hx446havecases:= union2.membership.forward with hx447casescaseswith xS | xT448 . have below := infimum.below with complete, hS, xS449exact transitive with meet(A, r, infimum(A, r, S), infimum(A, r, T)),450 meetA, infimum(A, r, S), infS, x, (hS with x, xS), mS, below451 . have below := infimum.below with complete, hT, xT452exact transitive with meet(A, r, infimum(A, r, S), infimum(A, r, T)),453 meetA, infimum(A, r, T), infT, x, (hT with x, xT), mT, below454 . intros b hb bound455have boundS := LowerBound.antitone with (union2.subset_left at S, T),456 bound457have boundT := LowerBound.antitone with (union2.subset_right at S, T),458 bound459have bs := infimum.greatest with complete, hS, hb, boundS460have bt := infimum.greatest with complete, hT, hb, boundT461exact meet.greatest with lattice, infS, infT, hb, bs, bt462 symm463exact infimum.of_infimum with complete, hST, result464465-- The powerset of a set, ordered by inclusion, is a complete lattice whose466-- suprema are unions and whose infima are intersections relative to X.467468def powersetOrder (X : Set) : Set:= inclusionOrder(𝒫(X))469470theorem powersetOrder.relates (X B C : Set)471requires hB : B ∈𝒫(X)472requires hC : C ∈𝒫(X)473shows relates(powersetOrder(X), B, C) ↔ B ⊆ C474proof475have characterization := inclusionOrder.relates with hB, hC476 simpa [powersetOrder] using characterization477478theorem powersetOrder.partial (X : Set)479shows IsPartialOrder(𝒫(X), powersetOrder(X))480proof481have partial := inclusionOrder.partial at𝒫(X)482 simpa [powersetOrder] using partial483484def relativeIntersection (X S : Set) : Set:= { x ∈ X |∀ B ∈ S, x ∈ B }485486theorem relativeIntersection.subset (X S : Set)487shows relativeIntersection(X, S) ⊆ X488proof489intros x hx490have member := relativeIntersection.membership.forward with hx491exact member.left492493theorem powersetOrder.supremum (X S : Set)494requires hS : S ⊆𝒫(X)495shows Supremum(𝒫(X), powersetOrder(X), S, ⋃(S))496proof497have unionIn : ⋃(S) ∈𝒫(X)498apply powerset.membership_iff.backward499apply union.subset500intros B hB501exact powerset.membership_iff.forward with (hS with B, hB)502constructor503 . refine⟨unionIn, hS, ?_⟩504intros B hB505have BIn := hS with B, hB506apply powersetOrder.relates.backward with BIn, unionIn507exact union.subset_of_member with hB508 . intros b hb bound509apply powersetOrder.relates.backward with unionIn, hb510apply union.subset511intros B hB512have related := UpperBound.above with bound, hB513exact powersetOrder.relates.forward with (hS with B, hB), hb, related514515theorem powersetOrder.infimum (X S : Set)516requires hS : S ⊆𝒫(X)517shows Infimum(𝒫(X), powersetOrder(X), S, relativeIntersection(X, S))518proof519have interIn : relativeIntersection(X, S) ∈𝒫(X) :=520 powerset.membership_iff.backward with (relativeIntersection.subset at X, S)521constructor522 . refine⟨interIn, hS, ?_⟩523intros B hB524apply powersetOrder.relates.backward with interIn, (hS with B, hB)525intros x hx526have member := relativeIntersection.membership.forward with hx527exact member.right with B, hB528 . intros b hb bound529apply powersetOrder.relates.backward with hb, interIn530intros x hx531have bX := powerset.membership_iff.forward with hb532apply relativeIntersection.membership.backward533constructor534 . exact bX with x, hx535 . intros B hB536have related := LowerBound.below with bound, hB537have subset := powersetOrder.relates.forward with hb, (hS with B, hB),538 related539exact subset with x, hx540541theorem IsCompleteLattice.powerset (X : Set)542shows IsCompleteLattice(𝒫(X), powersetOrder(X))543proof544constructor545 . exact powersetOrder.partial at X546 . intros S hS547refine⟨⋃(S), powersetOrder.supremum with hS⟩548549theorem powersetOrder.lattice (X : Set)550shows IsLattice(𝒫(X), powersetOrder(X))551proof552exact IsCompleteLattice.lattice with (IsCompleteLattice.powerset at X)553554theorem powersetOrder.supremum_value (X S : Set)555requires hS : S ⊆𝒫(X)556shows supremum(𝒫(X), powersetOrder(X), S) =⋃(S)557proof558have complete := IsCompleteLattice.powerset at X559 symm560exact supremum.of_supremum with complete, hS, (powersetOrder.supremum with hS)561562theorem powersetOrder.infimum_value (X S : Set)563requires hS : S ⊆𝒫(X)564shows infimum(𝒫(X), powersetOrder(X), S) = relativeIntersection(X, S)565proof566have complete := IsCompleteLattice.powerset at X567 symm568exact infimum.of_infimum with complete, hS, (powersetOrder.infimum with hS)569570theorem powersetOrder.join (X B C : Set)571requires hB : B ∈𝒫(X)572requires hC : C ∈𝒫(X)573shows join(𝒫(X), powersetOrder(X), B, C) = B ∪ C574proof575have lattice := powersetOrder.lattice at X576have BX := powerset.membership_iff.forward with hB577have CX := powerset.membership_iff.forward with hC578have unionIn : B ∪ C ∈𝒫(X) :=579 powerset.membership_iff.backward with (union2.subset with BX, CX)580have leftIn := powersetOrder.relates.backward with hB, unionIn,581 (union2.subset_left at B, C)582have rightIn := powersetOrder.relates.backward with hC, unionIn,583 (union2.subset_right at B, C)584have supremum : Supremum(𝒫(X), powersetOrder(X), {B, C}, B ∪ C)585apply Supremum.of_pair with hB, hC, unionIn, leftIn, rightIn586intros D hD BD CD587have BDsubset := powersetOrder.relates.forward with hB, hD, BD588have CDsubset := powersetOrder.relates.forward with hC, hD, CD589apply powersetOrder.relates.backward with unionIn, hD590exact union2.subset with BDsubset, CDsubset591 symm592exact join.of_supremum with lattice, hB, hC, supremum593594theorem powersetOrder.meet (X B C : Set)595requires hB : B ∈𝒫(X)596requires hC : C ∈𝒫(X)597shows meet(𝒫(X), powersetOrder(X), B, C) = B ∩ C598proof599have lattice := powersetOrder.lattice at X600have BX := powerset.membership_iff.forward with hB601have interIn : B ∩ C ∈𝒫(X) :=602 powerset.membership_iff.backward with (Subset.transitive with (intersection.subset_left at B, C), BX)603have leftIn := powersetOrder.relates.backward with interIn, hB,604 (intersection.subset_left at B, C)605have rightIn := powersetOrder.relates.backward with interIn, hC,606 (intersection.subset_right at B, C)607have infimum : Infimum(𝒫(X), powersetOrder(X), {B, C}, B ∩ C)608apply Infimum.of_pair with hB, hC, interIn, leftIn, rightIn609intros D hD DB DC610have DBsubset := powersetOrder.relates.forward with hD, hB, DB611have DCsubset := powersetOrder.relates.forward with hD, hC, DC612apply powersetOrder.relates.backward with hD, interIn613exact intersection.greatest with DBsubset, DCsubset614 symm615exact meet.of_infimum with lattice, hB, hC, infimum616617theorem powersetOrder.bounded (X : Set)618shows IsBoundedLattice(𝒫(X), powersetOrder(X), ∅, X)619proof620have lattice := powersetOrder.lattice at X621have emptyIn := powerset.empty_member at X622have selfIn := powerset.self at X623apply IsBoundedLattice.of_bounds with lattice624 . constructor625 . exact emptyIn626 . refine⟨emptyIn, Subset.reflexive at𝒫(X), ?_⟩627intros B hB628exact powersetOrder.relates.backward with emptyIn, hB, (empty.subset at B)629 . constructor630 . exact selfIn631 . refine⟨selfIn, Subset.reflexive at𝒫(X), ?_⟩632intros B hB633exact powersetOrder.relates.backward with hB, selfIn,634 (powerset.membership_iff.forward with hB)635