Theorem: exists_setIndependent_isCompl_sSup_atoms
File: Mathlib/Order/CompactlyGenerated.lean

tactic: have := zorn_subset
  {s : Set α | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ a ∈ s, IsAtom a}
  fun c hc1 hc2 =>
    ⟨⋃₀ c,
      ⟨CompleteLattice.independent_sUnion_of_directed hc2.directedOn fun s hs => (hc1 hs).1, ?_,
        fun a ⟨s, sc, as⟩ => (hc1 sc).2.2 a as⟩,
      fun _ => Set.subset_sUnion_of_mem⟩
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
⊢ ∃ s, CompleteLattice.SetIndependent s ∧ IsCompl b (sSup s) ∧ ∀ ⦃a : α⦄, a ∈ s → IsAtom a

tactic: obtain ⟨s, ⟨s_ind, b_inf_Sup_s, s_atoms⟩, s_max⟩ := this
state_before: case refine_2
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
this :
  ∃ m,
    m ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} ∧
      ∀ (a : Set α),
        a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → m ⊆ a → a = m
⊢ ∃ s, CompleteLattice.SetIndependent s ∧ IsCompl b (sSup s) ∧ ∀ ⦃a : α⦄, a ∈ s → IsAtom a

case refine_1
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
c : Set (Set α)
hc1 : c ⊆ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a}
hc2 : IsChain (fun x x_1 => x ⊆ x_1) c
⊢ Disjoint b (sSup (⋃₀ c))

tactic: swap
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
⊢ ∃ s, CompleteLattice.SetIndependent s ∧ IsCompl b (sSup s) ∧ ∀ ⦃a : α⦄, a ∈ s → IsAtom a

case refine_1
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
c : Set (Set α)
hc1 : c ⊆ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a}
hc2 : IsChain (fun x x_1 => x ⊆ x_1) c
⊢ Disjoint b (sSup (⋃₀ c))

tactic: refine' ⟨s, s_ind, ⟨b_inf_Sup_s, _⟩, s_atoms⟩
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
⊢ ∃ s, CompleteLattice.SetIndependent s ∧ IsCompl b (sSup s) ∧ ∀ ⦃a : α⦄, a ∈ s → IsAtom a

tactic: rw [codisjoint_iff_le_sup, ← h, sSup_le_iff]
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
⊢ Codisjoint b (sSup s)

tactic: intro a ha
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
⊢ ∀ (b_1 : α), b_1 ∈ {a | IsAtom a} → b_1 ≤ b ⊔ sSup s

tactic: rw [← inf_eq_left]
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
⊢ a ≤ b ⊔ sSup s

tactic: refine' (ha.le_iff.mp inf_le_left).resolve_left fun con => ha.1 _
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
⊢ a ⊓ (b ⊔ sSup s) = a

tactic: rw [← con, eq_comm, inf_eq_left]
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : a ⊓ (b ⊔ sSup s) = ⊥
⊢ a = ⊥

tactic: refine' (le_sSup _).trans le_sup_right
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : a ⊓ (b ⊔ sSup s) = ⊥
⊢ a ≤ b ⊔ sSup s

tactic: rw [← disjoint_iff] at con
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : a ⊓ (b ⊔ sSup s) = ⊥
⊢ a ∈ s

tactic: have a_dis_Sup_s : Disjoint a (sSup s) := con.mono_right le_sup_right
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
⊢ a ∈ s

tactic: rw [← s_max (s ∪ {a}) ⟨fun x hx => _, _, fun x hx => _⟩ (Set.subset_union_left _ _)]
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
⊢ a ∈ s

tactic: rw [sSup_sUnion, ← sSup_image, DirectedOn.disjoint_sSup_right]
state_before: case refine_1
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
c : Set (Set α)
hc1 : c ⊆ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a}
hc2 : IsChain (fun x x_1 => x ⊆ x_1) c
⊢ Disjoint b (sSup (⋃₀ c))

tactic: rintro _ ⟨s, hs, rfl⟩
state_before: case refine_1
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
c : Set (Set α)
hc1 : c ⊆ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a}
hc2 : IsChain (fun x x_1 => x ⊆ x_1) c
⊢ ∀ ⦃b_1 : α⦄, b_1 ∈ (fun t => sSup t) '' c → Disjoint b b_1

tactic: exact (hc1 hs).2.1
state_before: case refine_1.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
c : Set (Set α)
hc1 : c ⊆ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a}
hc2 : IsChain (fun x x_1 => x ⊆ x_1) c
s : Set α
hs : s ∈ c
⊢ Disjoint b ((fun t => sSup t) s)

tactic: rw [directedOn_image]
state_before: case refine_1
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
c : Set (Set α)
hc1 : c ⊆ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a}
hc2 : IsChain (fun x x_1 => x ⊆ x_1) c
⊢ DirectedOn (fun x x_1 => x ≤ x_1) ((fun t => sSup t) '' c)

tactic: exact hc2.directedOn.mono @fun s t => sSup_le_sSup
state_before: case refine_1
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
c : Set (Set α)
hc1 : c ⊆ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a}
hc2 : IsChain (fun x x_1 => x ⊆ x_1) c
⊢ DirectedOn ((fun t => sSup t) ⁻¹'o fun x x_1 => x ≤ x_1) c

tactic: exact Set.mem_union_right _ (Set.mem_singleton _)
state_before: case refine_2.intro.intro.intro.intro
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
⊢ a ∈ s ∪ {a}

tactic: intro x hx
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
⊢ ∀ (x : α), x ∈ s ∪ {a} → Disjoint x (sSup ((s ∪ {a}) \ {x}))

tactic: rw [Set.mem_union, Set.mem_singleton_iff] at hx
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∪ {a}
⊢ Disjoint x (sSup ((s ∪ {a}) \ {x}))

tactic: obtain rfl | xa := eq_or_ne x a
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
⊢ Disjoint x (sSup ((s ∪ {a}) \ {x}))

tactic: simp only [Set.mem_singleton, Set.insert_diff_of_mem, Set.union_singleton]
state_before: case inl
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
x : α
ha : x ∈ {a | IsAtom a}
con : Disjoint x (b ⊔ sSup s)
a_dis_Sup_s : Disjoint x (sSup s)
hx : x ∈ s ∨ x = x
⊢ Disjoint x (sSup ((s ∪ {x}) \ {x}))

tactic: exact con.mono_right ((sSup_le_sSup <| Set.diff_subset _ _).trans le_sup_right)
state_before: case inl
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
x : α
ha : x ∈ {a | IsAtom a}
con : Disjoint x (b ⊔ sSup s)
a_dis_Sup_s : Disjoint x (sSup s)
hx : x ∈ s ∨ x = x
⊢ Disjoint x (sSup (s \ {x}))

tactic: have h : (s ∪ {a}) \ {x} = s \ {x} ∪ {a} := by
  simp only [Set.union_singleton]
  rw [Set.insert_diff_of_not_mem]
  rw [Set.mem_singleton_iff]
  exact Ne.symm xa
state_before: case inr
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
xa : x ≠ a
⊢ Disjoint x (sSup ((s ∪ {a}) \ {x}))

tactic: rw [h, sSup_union, sSup_singleton]
state_before: case inr
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h✝ : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
xa : x ≠ a
h : (s ∪ {a}) \ {x} = s \ {x} ∪ {a}
⊢ Disjoint x (sSup ((s ∪ {a}) \ {x}))

tactic: apply
  (s_ind (hx.resolve_right xa)).disjoint_sup_right_of_disjoint_sup_left
    (a_dis_Sup_s.mono_right _).symm
state_before: case inr
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h✝ : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
xa : x ≠ a
h : (s ∪ {a}) \ {x} = s \ {x} ∪ {a}
⊢ Disjoint x (sSup (s \ {x}) ⊔ a)

tactic: rw [← sSup_insert, Set.insert_diff_singleton, Set.insert_eq_of_mem (hx.resolve_right xa)]
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h✝ : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
xa : x ≠ a
h : (s ∪ {a}) \ {x} = s \ {x} ∪ {a}
⊢ x ⊔ sSup (s \ {x}) ≤ sSup s

tactic: simp only [Set.union_singleton]
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
xa : x ≠ a
⊢ (s ∪ {a}) \ {x} = s \ {x} ∪ {a}

tactic: rw [Set.insert_diff_of_not_mem]
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
xa : x ≠ a
⊢ insert a s \ {x} = insert a (s \ {x})

tactic: rw [Set.mem_singleton_iff]
state_before: case h
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
xa : x ≠ a
⊢ ¬a ∈ {x}

tactic: exact Ne.symm xa
state_before: case h
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
xa : x ≠ a
⊢ ¬a = x

tactic: rw [sSup_union, sSup_singleton]
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
⊢ Disjoint b (sSup (s ∪ {a}))

tactic: exact b_inf_Sup_s.disjoint_sup_right_of_disjoint_sup_left con.symm
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
⊢ Disjoint b (sSup s ⊔ a)

tactic: intro x hx
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
⊢ ∀ (x : α), x ∈ s ∪ {a} → IsAtom x

tactic: rw [Set.mem_union, Set.mem_singleton_iff] at hx
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∪ {a}
⊢ IsAtom x

tactic: obtain hx | rfl := hx
state_before: ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s ∨ x = a
⊢ IsAtom x

tactic: exact s_atoms x hx
state_before: case inl
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
a : α
ha : a ∈ {a | IsAtom a}
con : Disjoint a (b ⊔ sSup s)
a_dis_Sup_s : Disjoint a (sSup s)
x : α
hx : x ∈ s
⊢ IsAtom x

tactic: exact ha
state_before: case inr
ι : Sort ?u.122982
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : IsModularLattice α
inst✝ : IsCompactlyGenerated α
h : sSup {a | IsAtom a} = ⊤
b : α
s : Set α
s_max :
  ∀ (a : Set α),
    a ∈ {s | CompleteLattice.SetIndependent s ∧ Disjoint b (sSup s) ∧ ∀ (a : α), a ∈ s → IsAtom a} → s ⊆ a → a = s
s_ind : CompleteLattice.SetIndependent s
b_inf_Sup_s : Disjoint b (sSup s)
s_atoms : ∀ (a : α), a ∈ s → IsAtom a
x : α
ha : x ∈ {a | IsAtom a}
con : Disjoint x (b ⊔ sSup s)
a_dis_Sup_s : Disjoint x (sSup s)
⊢ IsAtom x