l3lab/ntp-mathlib huggingface dataset:
theorem pairwise_disjoint_Ioo_int_cast : Pairwise (Disjoint on fun n : ℤ => Ioo (n : α) (n + 1)) :=
  by 

Proof state:
α : Type u_1
inst✝ : OrderedRing α
a : α
⊢ Pairwise (Disjoint on fun n => Ioo (↑n) (↑n + 1))

Next tactic:
simpa only [zero_add] using pairwise_disjoint_Ioo_add_int_cast (0 : α)
theorem pairwise_disjoint_Ioc_int_cast : Pairwise (Disjoint on fun n : ℤ => Ioc (n : α) (n + 1)) :=
  by 

Proof state:
α : Type u_1
inst✝ : OrderedRing α
a : α
⊢ Pairwise (Disjoint on fun n => Ioc (↑n) (↑n + 1))

Next tactic:
simpa only [zero_add] using pairwise_disjoint_Ioc_add_int_cast (0 : α)
@[to_additive]
instance Hom_FunLike (X Y : MonCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
  show FunLike (X →* Y) X (fun _ => Y) by 

Proof state:
X Y : MonCat
⊢ FunLike (↑X →* ↑Y) ↑X fun x => ↑Y

Next tactic:
infer_instance
@[to_additive]
instance {G : Type*} [Group G] : Group (MonCat.of G) := by 

Proof state:
G : Type u_1
inst✝ : Group G
⊢ Group ↑(of G)

Next tactic:
assumption
@[to_additive]
instance concreteCategory : ConcreteCategory CommMonCat := by
  

Proof state:
⊢ ConcreteCategory CommMonCat

Next tactic:
dsimp only [CommMonCat]
@[to_additive]
instance concreteCategory : ConcreteCategory CommMonCat := by
  dsimp only [CommMonCat]
  

Proof state:
⊢ ConcreteCategory (Bundled CommMonoid)

Next tactic:
infer_instance
@[to_additive]
instance Hom_FunLike (X Y : CommMonCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
  show FunLike (X →* Y) X (fun _ => Y) by 

Proof state:
X Y : CommMonCat
⊢ FunLike (↑X →* ↑Y) ↑X fun x => ↑Y

Next tactic:
infer_instance
example {R S : MonCat} (i : R ⟶ S) (r : R) (h : r = 1) : i r = 1 := by 

Proof state:
R S : MonCat
i : R ⟶ S
r : ↑R
h : r = 1
⊢ i r = 1

Next tactic:
simp [h]
example {R S : CommMonCat} (i : R ⟶ S) (r : R) (h : r = 1) : i r = 1 := by 

Proof state:
R S : CommMonCat
i : R ⟶ S
r : ↑R
h : r = 1
⊢ i r = 1

Next tactic:
simp [h]
example (R : CommMonCat.{u}) : R ⟶ R :=
  { toFun := fun x => by
      

Proof state:
R : CommMonCat
x : ↑R
⊢ ↑R

Next tactic:
match_target (R : Type u)
example (R : CommMonCat.{u}) : R ⟶ R :=
  { toFun := fun x => by
      match_target (R : Type u)
      

Proof state:
R : CommMonCat
x : ↑R
⊢ ↑R

Next tactic:
guard_hyp x : (R : Type u)
example (R : CommMonCat.{u}) : R ⟶ R :=
  { toFun := fun x => by
      match_target (R : Type u)
      guard_hyp x : (R : Type u)
      

Proof state:
R : CommMonCat
x : ↑R
⊢ ↑R

Next tactic:
exact x * x
example (R : CommMonCat.{u}) : R ⟶ R :=
  { toFun := fun x => by
      match_target (R : Type u)
      guard_hyp x : (R : Type u)
      exact x * x
    map_one' := by 

Proof state:
R : CommMonCat
⊢ (fun x => x * x) 1 = 1

Next tactic:
simp
example (R : CommMonCat.{u}) : R ⟶ R :=
  { toFun := fun x => by
      match_target (R : Type u)
      guard_hyp x : (R : Type u)
      exact x * x
    map_one' := by simp
    map_mul' := fun x y => by
      

Proof state:
R : CommMonCat
x y : ↑R
⊢ OneHom.toFun { toFun := fun x => x * x, map_one' := (_ : 1 * 1 = 1) } (x * y) =
    OneHom.toFun { toFun := fun x => x * x, map_one' := (_ : 1 * 1 = 1) } x *
      OneHom.toFun { toFun := fun x => x * x, map_one' := (_ : 1 * 1 = 1) } y

Next tactic:
dsimp
example (R : CommMonCat.{u}) : R ⟶ R :=
  { toFun := fun x => by
      match_target (R : Type u)
      guard_hyp x : (R : Type u)
      exact x * x
    map_one' := by simp
    map_mul' := fun x y => by
      dsimp
      

Proof state:
R : CommMonCat
x y : ↑R
⊢ x * y * (x * y) = x * x * (y * y)

Next tactic:
rw [mul_assoc x y (x * y), ← mul_assoc y x y, mul_comm y x, mul_assoc, mul_assoc]
@[to_additive]
instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u}) where
  reflects {X Y} f _ := by
    

Proof state:
X✝ Y✝ : Type u
X Y : MonCat
f : X ⟶ Y
x✝ : IsIso ((forget MonCat).map f)
⊢ IsIso f

Next tactic:
let i := asIso ((forget MonCat).map f)
@[to_additive]
instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u}) where
  reflects {X Y} f _ := by
    let i := asIso ((forget MonCat).map f)
    -- Again a problem that exists already creeps into other things leanprover/lean4#2644
    -- this used to be `by aesop`; see next declaration
    

Proof state:
X✝ Y✝ : Type u
X Y : MonCat
f : X ⟶ Y
x✝ : IsIso ((forget MonCat).map f)
i : (forget MonCat).obj X ≅ (forget MonCat).obj Y := asIso ((forget MonCat).map f)
⊢ IsIso f

Next tactic:
let e : X ≃* Y := MulEquiv.mk i.toEquiv (MonoidHom.map_mul (show MonoidHom X Y from f))
@[to_additive]
instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u}) where
  reflects {X Y} f _ := by
    let i := asIso ((forget MonCat).map f)
    -- Again a problem that exists already creeps into other things leanprover/lean4#2644
    -- this used to be `by aesop`; see next declaration
    let e : X ≃* Y := MulEquiv.mk i.toEquiv (MonoidHom.map_mul (show MonoidHom X Y from f))
    

Proof state:
X✝ Y✝ : Type u
X Y : MonCat
f : X ⟶ Y
x✝ : IsIso ((forget MonCat).map f)
i : (forget MonCat).obj X ≅ (forget MonCat).obj Y := asIso ((forget MonCat).map f)
e : ↑X ≃* ↑Y :=
  { toEquiv := i.toEquiv,
    map_mul' :=
      (_ :
        ∀ (a b : ↑X),
          (let_fun this := f;
              this)
              (a * b) =
            (let_fun this := f;
                this)
                a *
              (let_fun this := f;
                this)
                b) }
⊢ IsIso f

Next tactic:
exact IsIso.of_iso e.toMonCatIso
@[to_additive]
instance CommMonCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommMonCat.{u}) where
  reflects {X Y} f _ := by
    

Proof state:
X✝ Y✝ : Type u
X Y : CommMonCat
f : X ⟶ Y
x✝ : IsIso ((forget CommMonCat).map f)
⊢ IsIso f

Next tactic:
let i := asIso ((forget CommMonCat).map f)
@[to_additive]
instance CommMonCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommMonCat.{u}) where
  reflects {X Y} f _ := by
    let i := asIso ((forget CommMonCat).map f)
    

Proof state:
X✝ Y✝ : Type u
X Y : CommMonCat
f : X ⟶ Y
x✝ : IsIso ((forget CommMonCat).map f)
i : (forget CommMonCat).obj X ≅ (forget CommMonCat).obj Y := asIso ((forget CommMonCat).map f)
⊢ IsIso f

Next tactic:
let e : X ≃* Y := MulEquiv.mk i.toEquiv
      -- Porting FIXME: this would ideally be `by aesop`, as in `MonCat.forget_reflects_isos`
      (MonoidHom.map_mul (show MonoidHom X Y from f))
@[to_additive]
instance CommMonCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommMonCat.{u}) where
  reflects {X Y} f _ := by
    let i := asIso ((forget CommMonCat).map f)
    let e : X ≃* Y := MulEquiv.mk i.toEquiv
      -- Porting FIXME: this would ideally be `by aesop`, as in `MonCat.forget_reflects_isos`
      (MonoidHom.map_mul (show MonoidHom X Y from f))
    

Proof state:
X✝ Y✝ : Type u
X Y : CommMonCat
f : X ⟶ Y
x✝ : IsIso ((forget CommMonCat).map f)
i : (forget CommMonCat).obj X ≅ (forget CommMonCat).obj Y := asIso ((forget CommMonCat).map f)
e : ↑X ≃* ↑Y :=
  { toEquiv := i.toEquiv,
    map_mul' :=
      (_ :
        ∀ (a b : ↑X),
          (let_fun this := f;
              this)
              (a * b) =
            (let_fun this := f;
                this)
                a *
              (let_fun this := f;
                this)
                b) }
⊢ IsIso f

Next tactic:
exact IsIso.of_iso e.toCommMonCatIso
@[trans]
protected theorem IsExtreme.trans (hAB : IsExtreme 𝕜 A B) (hBC : IsExtreme 𝕜 B C) :
    IsExtreme 𝕜 A C := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
hAB : IsExtreme 𝕜 A B
hBC : IsExtreme 𝕜 B C
⊢ IsExtreme 𝕜 A C

Next tactic:
refine' ⟨Subset.trans hBC.1 hAB.1, fun x₁ hx₁A x₂ hx₂A x hxC hx ↦ _⟩
@[trans]
protected theorem IsExtreme.trans (hAB : IsExtreme 𝕜 A B) (hBC : IsExtreme 𝕜 B C) :
    IsExtreme 𝕜 A C := by
  refine' ⟨Subset.trans hBC.1 hAB.1, fun x₁ hx₁A x₂ hx₂A x hxC hx ↦ _⟩
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x✝ : E
hAB : IsExtreme 𝕜 A B
hBC : IsExtreme 𝕜 B C
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hxC : x ∈ C
hx : x ∈ openSegment 𝕜 x₁ x₂
⊢ x₁ ∈ C ∧ x₂ ∈ C

Next tactic:
obtain ⟨hx₁B, hx₂B⟩ := hAB.2 hx₁A hx₂A (hBC.1 hxC) hx
@[trans]
protected theorem IsExtreme.trans (hAB : IsExtreme 𝕜 A B) (hBC : IsExtreme 𝕜 B C) :
    IsExtreme 𝕜 A C := by
  refine' ⟨Subset.trans hBC.1 hAB.1, fun x₁ hx₁A x₂ hx₂A x hxC hx ↦ _⟩
  obtain ⟨hx₁B, hx₂B⟩ := hAB.2 hx₁A hx₂A (hBC.1 hxC) hx
  

Proof state:
case intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x✝ : E
hAB : IsExtreme 𝕜 A B
hBC : IsExtreme 𝕜 B C
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hxC : x ∈ C
hx : x ∈ openSegment 𝕜 x₁ x₂
hx₁B : x₁ ∈ B
hx₂B : x₂ ∈ B
⊢ x₁ ∈ C ∧ x₂ ∈ C

Next tactic:
exact hBC.2 hx₁B hx₂B hxC hx
theorem IsExtreme.inter (hAB : IsExtreme 𝕜 A B) (hAC : IsExtreme 𝕜 A C) :
    IsExtreme 𝕜 A (B ∩ C) := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
hAB : IsExtreme 𝕜 A B
hAC : IsExtreme 𝕜 A C
⊢ IsExtreme 𝕜 A (B ∩ C)

Next tactic:
use Subset.trans (inter_subset_left _ _) hAB.1
theorem IsExtreme.inter (hAB : IsExtreme 𝕜 A B) (hAC : IsExtreme 𝕜 A C) :
    IsExtreme 𝕜 A (B ∩ C) := by
  use Subset.trans (inter_subset_left _ _) hAB.1
  

Proof state:
case right
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
hAB : IsExtreme 𝕜 A B
hAC : IsExtreme 𝕜 A C
⊢ ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → ∀ ⦃x : E⦄, x ∈ B ∩ C → x ∈ openSegment 𝕜 x₁ x₂ → x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C

Next tactic:
rintro x₁ hx₁A x₂ hx₂A x ⟨hxB, hxC⟩ hx
theorem IsExtreme.inter (hAB : IsExtreme 𝕜 A B) (hAC : IsExtreme 𝕜 A C) :
    IsExtreme 𝕜 A (B ∩ C) := by
  use Subset.trans (inter_subset_left _ _) hAB.1
  rintro x₁ hx₁A x₂ hx₂A x ⟨hxB, hxC⟩ hx
  

Proof state:
case right.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x✝ : E
hAB : IsExtreme 𝕜 A B
hAC : IsExtreme 𝕜 A C
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hxB : x ∈ B
hxC : x ∈ C
hx : x ∈ openSegment 𝕜 x₁ x₂
⊢ x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C

Next tactic:
obtain ⟨hx₁B, hx₂B⟩ := hAB.2 hx₁A hx₂A hxB hx
theorem IsExtreme.inter (hAB : IsExtreme 𝕜 A B) (hAC : IsExtreme 𝕜 A C) :
    IsExtreme 𝕜 A (B ∩ C) := by
  use Subset.trans (inter_subset_left _ _) hAB.1
  rintro x₁ hx₁A x₂ hx₂A x ⟨hxB, hxC⟩ hx
  obtain ⟨hx₁B, hx₂B⟩ := hAB.2 hx₁A hx₂A hxB hx
  

Proof state:
case right.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x✝ : E
hAB : IsExtreme 𝕜 A B
hAC : IsExtreme 𝕜 A C
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hxB : x ∈ B
hxC : x ∈ C
hx : x ∈ openSegment 𝕜 x₁ x₂
hx₁B : x₁ ∈ B
hx₂B : x₂ ∈ B
⊢ x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C

Next tactic:
obtain ⟨hx₁C, hx₂C⟩ := hAC.2 hx₁A hx₂A hxC hx
theorem IsExtreme.inter (hAB : IsExtreme 𝕜 A B) (hAC : IsExtreme 𝕜 A C) :
    IsExtreme 𝕜 A (B ∩ C) := by
  use Subset.trans (inter_subset_left _ _) hAB.1
  rintro x₁ hx₁A x₂ hx₂A x ⟨hxB, hxC⟩ hx
  obtain ⟨hx₁B, hx₂B⟩ := hAB.2 hx₁A hx₂A hxB hx
  obtain ⟨hx₁C, hx₂C⟩ := hAC.2 hx₁A hx₂A hxC hx
  

Proof state:
case right.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x✝ : E
hAB : IsExtreme 𝕜 A B
hAC : IsExtreme 𝕜 A C
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hxB : x ∈ B
hxC : x ∈ C
hx : x ∈ openSegment 𝕜 x₁ x₂
hx₁B : x₁ ∈ B
hx₂B : x₂ ∈ B
hx₁C : x₁ ∈ C
hx₂C : x₂ ∈ C
⊢ x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C

Next tactic:
exact ⟨⟨hx₁B, hx₁C⟩, hx₂B, hx₂C⟩
theorem isExtreme_iInter {ι : Sort*} [Nonempty ι] {F : ι → Set E}
    (hAF : ∀ i : ι, IsExtreme 𝕜 A (F i)) : IsExtreme 𝕜 A (⋂ i : ι, F i) := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F✝ : Type u_3
ι✝ : Type u_4
π : ι✝ → Type u_5
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x : E
ι : Sort u_6
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
⊢ IsExtreme 𝕜 A (⋂ i, F i)

Next tactic:
obtain i := Classical.arbitrary ι
theorem isExtreme_iInter {ι : Sort*} [Nonempty ι] {F : ι → Set E}
    (hAF : ∀ i : ι, IsExtreme 𝕜 A (F i)) : IsExtreme 𝕜 A (⋂ i : ι, F i) := by
  obtain i := Classical.arbitrary ι
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F✝ : Type u_3
ι✝ : Type u_4
π : ι✝ → Type u_5
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x : E
ι : Sort u_6
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
i : ι
⊢ IsExtreme 𝕜 A (⋂ i, F i)

Next tactic:
refine' ⟨iInter_subset_of_subset i (hAF i).1, fun x₁ hx₁A x₂ hx₂A x hxF hx ↦ _⟩
theorem isExtreme_iInter {ι : Sort*} [Nonempty ι] {F : ι → Set E}
    (hAF : ∀ i : ι, IsExtreme 𝕜 A (F i)) : IsExtreme 𝕜 A (⋂ i : ι, F i) := by
  obtain i := Classical.arbitrary ι
  refine' ⟨iInter_subset_of_subset i (hAF i).1, fun x₁ hx₁A x₂ hx₂A x hxF hx ↦ _⟩
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F✝ : Type u_3
ι✝ : Type u_4
π : ι✝ → Type u_5
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x✝ : E
ι : Sort u_6
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
i : ι
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hxF : x ∈ ⋂ i, F i
hx : x ∈ openSegment 𝕜 x₁ x₂
⊢ x₁ ∈ ⋂ i, F i ∧ x₂ ∈ ⋂ i, F i

Next tactic:
simp_rw [mem_iInter] at hxF ⊢
theorem isExtreme_iInter {ι : Sort*} [Nonempty ι] {F : ι → Set E}
    (hAF : ∀ i : ι, IsExtreme 𝕜 A (F i)) : IsExtreme 𝕜 A (⋂ i : ι, F i) := by
  obtain i := Classical.arbitrary ι
  refine' ⟨iInter_subset_of_subset i (hAF i).1, fun x₁ hx₁A x₂ hx₂A x hxF hx ↦ _⟩
  simp_rw [mem_iInter] at hxF ⊢
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F✝ : Type u_3
ι✝ : Type u_4
π : ι✝ → Type u_5
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x✝ : E
ι : Sort u_6
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
i : ι
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hx : x ∈ openSegment 𝕜 x₁ x₂
hxF : ∀ (i : ι), x ∈ F i
⊢ (∀ (i : ι), x₁ ∈ F i) ∧ ∀ (i : ι), x₂ ∈ F i

Next tactic:
have h := fun i ↦ (hAF i).2 hx₁A hx₂A (hxF i) hx
theorem isExtreme_iInter {ι : Sort*} [Nonempty ι] {F : ι → Set E}
    (hAF : ∀ i : ι, IsExtreme 𝕜 A (F i)) : IsExtreme 𝕜 A (⋂ i : ι, F i) := by
  obtain i := Classical.arbitrary ι
  refine' ⟨iInter_subset_of_subset i (hAF i).1, fun x₁ hx₁A x₂ hx₂A x hxF hx ↦ _⟩
  simp_rw [mem_iInter] at hxF ⊢
  have h := fun i ↦ (hAF i).2 hx₁A hx₂A (hxF i) hx
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F✝ : Type u_3
ι✝ : Type u_4
π : ι✝ → Type u_5
inst✝³ : OrderedSemiring 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : SMul 𝕜 E
A B C : Set E
x✝ : E
ι : Sort u_6
inst✝ : Nonempty ι
F : ι → Set E
hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i)
i : ι
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
x : E
hx : x ∈ openSegment 𝕜 x₁ x₂
hxF : ∀ (i : ι), x ∈ F i
h : ∀ (i : ι), x₁ ∈ F i ∧ x₂ ∈ F i
⊢ (∀ (i : ι), x₁ ∈ F i) ∧ ∀ (i : ι), x₂ ∈ F i

Next tactic:
exact ⟨fun i ↦ (h i).1, fun i ↦ (h i).2⟩
theorem isExtreme_biInter {F : Set (Set E)} (hF : F.Nonempty) (hA : ∀ B ∈ F, IsExtreme 𝕜 A B) :
    IsExtreme 𝕜 A (⋂ B ∈ F, B) := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F✝ : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
F : Set (Set E)
hF : Set.Nonempty F
hA : ∀ B ∈ F, IsExtreme 𝕜 A B
⊢ IsExtreme 𝕜 A (⋂ B ∈ F, B)

Next tactic:
haveI := hF.to_subtype
theorem isExtreme_biInter {F : Set (Set E)} (hF : F.Nonempty) (hA : ∀ B ∈ F, IsExtreme 𝕜 A B) :
    IsExtreme 𝕜 A (⋂ B ∈ F, B) := by
  haveI := hF.to_subtype
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F✝ : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
F : Set (Set E)
hF : Set.Nonempty F
hA : ∀ B ∈ F, IsExtreme 𝕜 A B
this : Nonempty ↑F
⊢ IsExtreme 𝕜 A (⋂ B ∈ F, B)

Next tactic:
simpa only [iInter_subtype] using isExtreme_iInter fun i : F ↦ hA _ i.2
theorem isExtreme_sInter {F : Set (Set E)} (hF : F.Nonempty) (hAF : ∀ B ∈ F, IsExtreme 𝕜 A B) :
    IsExtreme 𝕜 A (⋂₀ F) := by 

Proof state:
𝕜 : Type u_1
E : Type u_2
F✝ : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
F : Set (Set E)
hF : Set.Nonempty F
hAF : ∀ B ∈ F, IsExtreme 𝕜 A B
⊢ IsExtreme 𝕜 A (⋂₀ F)

Next tactic:
simpa [sInter_eq_biInter] using isExtreme_biInter hF hAF
/-- x is an extreme point to A iff {x} is an extreme set of A. -/
@[simp] lemma isExtreme_singleton : IsExtreme 𝕜 A {x} ↔ x ∈ A.extremePoints 𝕜 := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
⊢ IsExtreme 𝕜 A {x} ↔ x ∈ extremePoints 𝕜 A

Next tactic:
refine ⟨fun hx ↦ ⟨singleton_subset_iff.1 hx.1, fun x₁ hx₁ x₂ hx₂ ↦ hx.2 hx₁ hx₂ rfl⟩, ?_⟩
/-- x is an extreme point to A iff {x} is an extreme set of A. -/
@[simp] lemma isExtreme_singleton : IsExtreme 𝕜 A {x} ↔ x ∈ A.extremePoints 𝕜 := by
  refine ⟨fun hx ↦ ⟨singleton_subset_iff.1 hx.1, fun x₁ hx₁ x₂ hx₂ ↦ hx.2 hx₁ hx₂ rfl⟩, ?_⟩
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
⊢ x ∈ extremePoints 𝕜 A → IsExtreme 𝕜 A {x}

Next tactic:
rintro ⟨hxA, hAx⟩
/-- x is an extreme point to A iff {x} is an extreme set of A. -/
@[simp] lemma isExtreme_singleton : IsExtreme 𝕜 A {x} ↔ x ∈ A.extremePoints 𝕜 := by
  refine ⟨fun hx ↦ ⟨singleton_subset_iff.1 hx.1, fun x₁ hx₁ x₂ hx₂ ↦ hx.2 hx₁ hx₂ rfl⟩, ?_⟩
  rintro ⟨hxA, hAx⟩
  

Proof state:
case intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
hxA : x ∈ A
hAx : ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → x ∈ openSegment 𝕜 x₁ x₂ → x₁ = x ∧ x₂ = x
⊢ IsExtreme 𝕜 A {x}

Next tactic:
use singleton_subset_iff.2 hxA
/-- x is an extreme point to A iff {x} is an extreme set of A. -/
@[simp] lemma isExtreme_singleton : IsExtreme 𝕜 A {x} ↔ x ∈ A.extremePoints 𝕜 := by
  refine ⟨fun hx ↦ ⟨singleton_subset_iff.1 hx.1, fun x₁ hx₁ x₂ hx₂ ↦ hx.2 hx₁ hx₂ rfl⟩, ?_⟩
  rintro ⟨hxA, hAx⟩
  use singleton_subset_iff.2 hxA
  

Proof state:
case right
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
hxA : x ∈ A
hAx : ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → x ∈ openSegment 𝕜 x₁ x₂ → x₁ = x ∧ x₂ = x
⊢ ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → ∀ ⦃x_1 : E⦄, x_1 ∈ {x} → x_1 ∈ openSegment 𝕜 x₁ x₂ → x₁ ∈ {x} ∧ x₂ ∈ {x}

Next tactic:
rintro x₁ hx₁A x₂ hx₂A y (rfl : y = x)
/-- x is an extreme point to A iff {x} is an extreme set of A. -/
@[simp] lemma isExtreme_singleton : IsExtreme 𝕜 A {x} ↔ x ∈ A.extremePoints 𝕜 := by
  refine ⟨fun hx ↦ ⟨singleton_subset_iff.1 hx.1, fun x₁ hx₁ x₂ hx₂ ↦ hx.2 hx₁ hx₂ rfl⟩, ?_⟩
  rintro ⟨hxA, hAx⟩
  use singleton_subset_iff.2 hxA
  rintro x₁ hx₁A x₂ hx₂A y (rfl : y = x)
  

Proof state:
case right
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x₁ : E
hx₁A : x₁ ∈ A
x₂ : E
hx₂A : x₂ ∈ A
y : E
hxA : y ∈ A
hAx : ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → y ∈ openSegment 𝕜 x₁ x₂ → x₁ = y ∧ x₂ = y
⊢ y ∈ openSegment 𝕜 x₁ x₂ → x₁ ∈ {y} ∧ x₂ ∈ {y}

Next tactic:
exact hAx hx₁A hx₂A
theorem IsExtreme.extremePoints_subset_extremePoints (hAB : IsExtreme 𝕜 A B) :
    B.extremePoints 𝕜 ⊆ A.extremePoints 𝕜 :=
  fun _ ↦ by 

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : SMul 𝕜 E
A B C : Set E
x : E
hAB : IsExtreme 𝕜 A B
x✝ : E
⊢ x✝ ∈ extremePoints 𝕜 B → x✝ ∈ extremePoints 𝕜 A

Next tactic:
simpa only [← isExtreme_singleton] using hAB.trans
@[simp]
theorem extremePoints_prod (s : Set E) (t : Set F) :
    (s ×ˢ t).extremePoints 𝕜 = s.extremePoints 𝕜 ×ˢ t.extremePoints 𝕜 := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : AddCommGroup F
inst✝³ : (i : ι) → AddCommGroup (π i)
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 F
inst✝ : (i : ι) → Module 𝕜 (π i)
A B : Set E
x : E
s : Set E
t : Set F
⊢ extremePoints 𝕜 (s ×ˢ t) = extremePoints 𝕜 s ×ˢ extremePoints 𝕜 t

Next tactic:
ext
@[simp]
theorem extremePoints_prod (s : Set E) (t : Set F) :
    (s ×ˢ t).extremePoints 𝕜 = s.extremePoints 𝕜 ×ˢ t.extremePoints 𝕜 := by
  ext
  

Proof state:
case h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : AddCommGroup F
inst✝³ : (i : ι) → AddCommGroup (π i)
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 F
inst✝ : (i : ι) → Module 𝕜 (π i)
A B : Set E
x : E
s : Set E
t : Set F
x✝ : E × F
⊢ x✝ ∈ extremePoints 𝕜 (s ×ˢ t) ↔ x✝ ∈ extremePoints 𝕜 s ×ˢ extremePoints 𝕜 t

Next tactic:
refine' (and_congr_right fun hx ↦ ⟨fun h ↦ _, fun h ↦ _⟩).trans and_and_and_comm
@[simp]
theorem extremePoints_prod (s : Set E) (t : Set F) :
    (s ×ˢ t).extremePoints 𝕜 = s.extremePoints 𝕜 ×ˢ t.extremePoints 𝕜 := by
  ext
  refine' (and_congr_right fun hx ↦ ⟨fun h ↦ _, fun h ↦ _⟩).trans and_and_and_comm
  

Proof state:
case h.refine'_1
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : AddCommGroup F
inst✝³ : (i : ι) → AddCommGroup (π i)
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 F
inst✝ : (i : ι) → Module 𝕜 (π i)
A B : Set E
x : E
s : Set E
t : Set F
x✝ : E × F
hx : x✝ ∈ s ×ˢ t
h : ∀ ⦃x₁ : E × F⦄, x₁ ∈ s ×ˢ t → ∀ ⦃x₂ : E × F⦄, x₂ ∈ s ×ˢ t → x✝ ∈ openSegment 𝕜 x₁ x₂ → x₁ = x✝ ∧ x₂ = x✝
⊢ (∀ ⦃x₁ : E⦄, x₁ ∈ s → ∀ ⦃x₂ : E⦄, x₂ ∈ s → x✝.1 ∈ openSegment 𝕜 x₁ x₂ → x₁ = x✝.1 ∧ x₂ = x✝.1) ∧
    ∀ ⦃x₁ : F⦄, x₁ ∈ t → ∀ ⦃x₂ : F⦄, x₂ ∈ t → x✝.2 ∈ openSegment 𝕜 x₁ x₂ → x₁ = x✝.2 ∧ x₂ = x✝.2
case h.refine'_2
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : AddCommGroup F
inst✝³ : (i : ι) → AddCommGroup (π i)
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 F
inst✝ : (i : ι) → Module 𝕜 (π i)
A B : Set E
x : E
s : Set E
t : Set F
x✝ : E × F
hx : x✝ ∈ s ×ˢ t
h :
  (∀ ⦃x₁ : E⦄, x₁ ∈ s → ∀ ⦃x₂ : E⦄, x₂ ∈ s → x✝.1 ∈ openSegment 𝕜 x₁ x₂ → x₁ = x✝.1 ∧ x₂ = x✝.1) ∧
    ∀ ⦃x₁ : F⦄, x₁ ∈ t → ∀ ⦃x₂ : F⦄, x₂ ∈ t → x✝.2 ∈ openSegment 𝕜 x₁ x₂ → x₁ = x✝.2 ∧ x₂ = x✝.2
⊢ ∀ ⦃x₁ : E × F⦄, x₁ ∈ s ×ˢ t → ∀ ⦃x₂ : E × F⦄, x₂ ∈ s ×ˢ t → x✝ ∈ openSegment 𝕜 x₁ x₂ → x₁ = x✝ ∧ x₂ = x✝

Next tactic:
constructor
@[simp]
theorem extremePoints_prod (s : Set E) (t : Set F) :
    (s ×ˢ t).extremePoints 𝕜 = s.extremePoints 𝕜 ×ˢ t.extremePoints 𝕜 := by
  ext
  refine' (and_congr_right fun hx ↦ ⟨fun h ↦ _, fun h ↦ _⟩).trans and_and_and_comm
  constructor
  · 

Proof state:
case h.refine'_1.left
𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : AddCommGroup F
inst✝³ : (i : ι) → AddCommGroup (π i)
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 F
inst✝ : (i : ι) → Module 𝕜 (π i)
A B : Set E
x : E
s : Set E
t : Set F
x✝ : E × F
hx : x✝ ∈ s ×ˢ t
h : ∀ ⦃x₁ : E × F⦄, x₁ ∈ s ×ˢ t → ∀ ⦃x₂ : E × F⦄, x₂ ∈ s ×ˢ t → x✝ ∈ openSegment 𝕜 x₁ x₂ → x₁ = x✝ ∧ x₂ = x✝
⊢ ∀ ⦃x₁ : E⦄, x₁ ∈ s → ∀ ⦃x₂ : E⦄, x₂ ∈ s → x✝.1 ∈ openSegment 𝕜 x₁ x₂ → x₁ = x✝.1 ∧ x₂ = x✝.1

Next tactic:
rintro x₁ hx₁ x₂ hx₂ hx_fst