l3lab/ntp-mathlib huggingface dataset:
theorem isAtom_iff_eq_single [DecidableEq ι] [∀ i, PartialOrder (π i)]
    [∀ i, OrderBot (π i)] {f : ∀ i, π i} :
    IsAtom f ↔ ∃ i a, IsAtom a ∧ f = Function.update ⊥ i a := by
  constructor
  case mp =>
    intro h
    have ⟨i, h, hbot⟩ := isAtom_iff.1 h
    refine ⟨_, _, h, funext fun j => if hij : j = i then hij ▸ by simp else ?_⟩
    rw [Function.update_noteq hij, hbot _ hij, bot_apply]
  case mpr =>
    

Proof state:
ι : Type u_3
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → PartialOrder (π i)
inst✝ : (i : ι) → OrderBot (π i)
f : (i : ι) → π i
⊢ (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) → IsAtom f

Next tactic:
rintro ⟨i, a, h, rfl⟩
theorem isAtom_iff_eq_single [DecidableEq ι] [∀ i, PartialOrder (π i)]
    [∀ i, OrderBot (π i)] {f : ∀ i, π i} :
    IsAtom f ↔ ∃ i a, IsAtom a ∧ f = Function.update ⊥ i a := by
  constructor
  case mp =>
    intro h
    have ⟨i, h, hbot⟩ := isAtom_iff.1 h
    refine ⟨_, _, h, funext fun j => if hij : j = i then hij ▸ by simp else ?_⟩
    rw [Function.update_noteq hij, hbot _ hij, bot_apply]
  case mpr =>
    rintro ⟨i, a, h, rfl⟩
    

Proof state:
case intro.intro.intro
ι : Type u_3
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → PartialOrder (π i)
inst✝ : (i : ι) → OrderBot (π i)
i : ι
a : π i
h : IsAtom a
⊢ IsAtom (Function.update ⊥ i a)

Next tactic:
exact isAtom_single h
instance isAtomic [∀ i, PartialOrder (π i)] [∀ i, OrderBot (π i)] [∀ i, IsAtomic (π i)] :
    IsAtomic (∀ i, π i) where
  eq_bot_or_exists_atom_le b := or_iff_not_imp_left.2 fun h =>
    have ⟨i, hi⟩ : ∃ i, b i ≠ ⊥ := not_forall.1 (h.imp Pi.eq_bot_iff.2)
    have ⟨a, ha, hab⟩ := (eq_bot_or_exists_atom_le (b i)).resolve_left hi
    have : DecidableEq ι := open Classical in inferInstance
    ⟨Function.update ⊥ i a, isAtom_single ha, update_le_iff.2 ⟨hab, by 

Proof state:
ι : Type ?u.122663
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝² : (i : ι) → PartialOrder (π i)
inst✝¹ : (i : ι) → OrderBot (π i)
inst✝ : ∀ (i : ι), IsAtomic (π i)
b : (i : ι) → π i
h : ¬b = ⊥
i : ι
hi : ¬b i = ⊥
a : π i
ha : IsAtom a
hab : a ≤ b i
this : DecidableEq ι
⊢ ∀ (j : ι), j ≠ i → ⊥ j ≤ b j

Next tactic:
simp
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
⊢ ∃ s_1, s = sSup s_1 ∧ ∀ a ∈ s_1, IsAtom a

Next tactic:
classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; case neg => simp [Function.update_noteq hij]
      subst hij; simp only [Function.update_same]
      exact le_sSup ⟨ha, by simpa using hle i⟩
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
⊢ ∃ s_1, s = sSup s_1 ∧ ∀ a ∈ s_1, IsAtom a

Next tactic:
refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
⊢ ∀ a ∈ {f | IsAtom f ∧ f ≤ s}, IsAtom a

Next tactic:
simp
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
⊢ ∀ (a : (i : ι) → π i), IsAtom a → a ≤ s → IsAtom a

Next tactic:
tauto
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
⊢ s = sSup {f | IsAtom f ∧ f ≤ s}

Next tactic:
ext i
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    

Proof state:
case h
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ s i = sSup {f | IsAtom f ∧ f ≤ s} i

Next tactic:
rw [← sSup_atoms_le_eq (s i)]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    

Proof state:
case h
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {a | IsAtom a ∧ a ≤ s i} = sSup {f | IsAtom f ∧ f ≤ s} i

Next tactic:
simp_rw [isAtom_iff_eq_single]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    

Proof state:
case h
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {a | IsAtom a ∧ a ≤ s i} = sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i

Next tactic:
refine le_antisymm ?le ?ge
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    

Proof state:
case le
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {a | IsAtom a ∧ a ≤ s i} ≤ sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i
case ge
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i ≤ sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {a | IsAtom a ∧ a ≤ s i} ≤ sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i

Next tactic:
case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {a | IsAtom a ∧ a ≤ s i} ≤ sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i

Next tactic:
refine sSup_le fun a ⟨ha, hle⟩ => ?_
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
⊢ a ≤ sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i

Next tactic:
refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
⊢ (fun f => ↑f i)
      { val := Function.update ⊥ i a,
        property :=
          (_ :
            (∃ i_1 a_1, IsAtom a_1 ∧ Function.update ⊥ i a = Function.update ⊥ i_1 a_1) ∧ Function.update ⊥ i a ≤ s) } =
    a

Next tactic:
simp
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
⊢ Function.update ⊥ i a ≤ s

Next tactic:
intro j
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
j : ι
⊢ Function.update ⊥ i a j ≤ s j

Next tactic:
by_cases hij : j = i
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      

Proof state:
case pos
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
j : ι
hij : j = i
⊢ Function.update ⊥ i a j ≤ s j
case neg
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
j : ι
hij : ¬j = i
⊢ Function.update ⊥ i a j ≤ s j

Next tactic:
case pos => subst hij; simpa
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
j : ι
hij : j = i
⊢ Function.update ⊥ i a j ≤ s j

Next tactic:
case pos => subst hij; simpa
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
j : ι
hij : j = i
⊢ Function.update ⊥ i a j ≤ s j

Next tactic:
subst hij
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
j : ι
a : π j
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s j}
ha : IsAtom a
hle : a ≤ s j
⊢ Function.update ⊥ j a j ≤ s j

Next tactic:
simpa
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      

Proof state:
case neg
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
j : ι
hij : ¬j = i
⊢ Function.update ⊥ i a j ≤ s j

Next tactic:
case neg => simp [hij]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
j : ι
hij : ¬j = i
⊢ Function.update ⊥ i a j ≤ s j

Next tactic:
case neg => simp [hij]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
x✝ : a ∈ {a | IsAtom a ∧ a ≤ s i}
ha : IsAtom a
hle : a ≤ s i
j : ι
hij : ¬j = i
⊢ Function.update ⊥ i a j ≤ s j

Next tactic:
simp [hij]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    

Proof state:
case ge
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i ≤ sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; case neg => simp [Function.update_noteq hij]
      subst hij; simp only [Function.update_same]
      exact le_sSup ⟨ha, by simpa using hle i⟩
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i ≤ sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; case neg => simp [Function.update_noteq hij]
      subst hij; simp only [Function.update_same]
      exact le_sSup ⟨ha, by simpa using hle i⟩
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ sSup {f | (∃ i a, IsAtom a ∧ f = Function.update ⊥ i a) ∧ f ≤ s} i ≤ sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
refine sSup_le ?_
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
⊢ ∀ b ∈ Set.range fun f => ↑f i, b ≤ sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      

Proof state:
case intro.mk.intro.intro.intro.intro
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i j : ι
a : π j
ha : IsAtom a
hle : Function.update ⊥ j a ≤ s
⊢ (fun f => ↑f i)
      { val := Function.update ⊥ j a,
        property :=
          (_ : (∃ i a_1, IsAtom a_1 ∧ Function.update ⊥ j a = Function.update ⊥ i a_1) ∧ Function.update ⊥ j a ≤ s) } ≤
    sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
by_cases hij : i = j