ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.pullback_snd_isIso_of_range_subset
File: Mathlib/Geometry/RingedSpace/OpenImmersion.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ⇑g.base ⊆ Set.range ⇑f.base
⊢ IsIso (pullback.snd f g)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ⇑g.base ⊆ Set.range ⇑f.base
this : IsIso (pullback.snd f.base g.base)
⊢ IsIso (pullback.snd f g)
tactic: haveI := TopCat.snd_iso_of_left_embedding_range_subset hf.base_open.toEmbedding g.base H
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ⇑g.base ⊆ Set.range ⇑f.base
this : IsIso (pullback.snd f.base g.base)
⊢ IsIso (pullback.snd f g)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ⇑g.base ⊆ Set.range ⇑f.base
this✝ : IsIso (pullback.snd f.base g.base)
this : IsIso (pullback.snd f g).base
⊢ IsIso (pullback.snd f g)
tactic: have : IsIso (pullback.snd f g).base := by
    delta pullback.snd
    rw [← limit.isoLimitCone_hom_π ⟨_, pullbackConeOfLeftIsLimit f g⟩ WalkingCospan.right]
    change IsIso (_ ≫ pullback.snd _ _)
    infer_instance
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ⇑g.base ⊆ Set.range ⇑f.base
this✝ : IsIso (pullback.snd f.base g.base)
this : IsIso (pullback.snd f g).base
⊢ IsIso (pullback.snd f g)
state_after: no goals
tactic: apply to_iso
Theorem: Finset.induction_on_max
File: Mathlib/Data/Finset/Lattice.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
inst✝ : DecidableEq α
p : Finset α → Prop
s : Finset α
h0 : p ∅
step : ∀ (a : α) (s : Finset α), (∀ x ∈ s, x < a) → p s → p (insert a s)
⊢ p s
state_after: case a
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
inst✝ : DecidableEq α
p : Finset α → Prop
h0 : p ∅
step : ∀ (a : α) (s : Finset α), (∀ x ∈ s, x < a) → p s → p (insert a s)
s : Finset α
ihs : ∀ t ⊂ s, p t
⊢ p s
tactic: induction' s using Finset.strongInductionOn with s ihs
state_before: case a
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
inst✝ : DecidableEq α
p : Finset α → Prop
h0 : p ∅
step : ∀ (a : α) (s : Finset α), (∀ x ∈ s, x < a) → p s → p (insert a s)
s : Finset α
ihs : ∀ t ⊂ s, p t
⊢ p s
state_after: case a.inl
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
s : Finset α
H : s.Nonempty
x : α
inst✝ : DecidableEq α
p : Finset α → Prop
h0 : p ∅
step : ∀ (a : α) (s : Finset α), (∀ x ∈ s, x < a) → p s → p (insert a s)
ihs : ∀ t ⊂ ∅, p t
⊢ p ∅

case a.inr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
inst✝ : DecidableEq α
p : Finset α → Prop
h0 : p ∅
step : ∀ (a : α) (s : Finset α), (∀ x ∈ s, x < a) → p s → p (insert a s)
s : Finset α
ihs : ∀ t ⊂ s, p t
hne : s.Nonempty
⊢ p s
tactic: rcases s.eq_empty_or_nonempty with (rfl | hne)
Theorem: Real.quadratic_le_exp_of_nonneg
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x✝ y x : ℝ
hx : 0 ≤ x
⊢ 1 + x + x ^ 2 / 2 = ∑ i ∈ range 3, x ^ i / ↑i !
state_after: x✝ y x : ℝ
hx : 0 ≤ x
⊢ 1 + x + x ^ 2 / 2 = 1 / (↑0 + 1) + x / (↑0 + 1) + x ^ 2 / (↑0 + 1 + 1)
tactic: simp only [sum_range_succ, range_one, sum_singleton, _root_.pow_zero, factorial, cast_one,
          ne_eq, one_ne_zero, not_false_eq_true, div_self, pow_one, mul_one, div_one, Nat.mul_one,
          cast_succ, add_right_inj]
state_before: x✝ y x : ℝ
hx : 0 ≤ x
⊢ 1 + x + x ^ 2 / 2 = 1 / (↑0 + 1) + x / (↑0 + 1) + x ^ 2 / (↑0 + 1 + 1)
state_after: no goals
tactic: ring_nf
Theorem: Function.Involutive.iterate_eq_id
File: Mathlib/Algebra/Ring/Parity.lean

Proof steps:
state_before: F : Type u_1
α✝ : Type u_2
β : Type u_3
R : Type u_4
α : Type u_5
f : α → α
n : ℕ
hf : Involutive f
hne : f ≠ id
H : f^[n] = id
hn : Odd n
⊢ f = id
state_after: no goals
tactic: rwa [hf.iterate_odd hn] at H
Theorem: CategoryTheory.Adjunction.right_triangle
File: Mathlib/CategoryTheory/Adjunction/Basic.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
⊢ whiskerLeft G adj.unit ≫ whiskerRight adj.counit G = 𝟙 (G ⋙ 𝟭 C)
state_after: case w.h
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' x✝ : D
⊢ (whiskerLeft G adj.unit ≫ whiskerRight adj.counit G).app x✝ = (𝟙 (G ⋙ 𝟭 C)).app x✝
tactic: ext
state_before: case w.h
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' x✝ : D
⊢ (whiskerLeft G adj.unit ≫ whiskerRight adj.counit G).app x✝ = (𝟙 (G ⋙ 𝟭 C)).app x✝
state_after: case w.h
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' x✝ : D
⊢ adj.unit.app (G.obj x✝) ≫ G.map (adj.counit.app x✝) = 𝟙 (G.obj x✝)
tactic: dsimp
state_before: case w.h
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' x✝ : D
⊢ adj.unit.app (G.obj x✝) ≫ G.map (adj.counit.app x✝) = 𝟙 (G.obj x✝)
state_after: case w.h
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' x✝ : D
⊢ adj.counit.app x✝ = F.map (𝟙 (G.obj x✝)) ≫ adj.counit.app x✝
tactic: erw [← adj.homEquiv_unit, ← Equiv.eq_symm_apply, adj.homEquiv_counit]
state_before: case w.h
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' x✝ : D
⊢ adj.counit.app x✝ = F.map (𝟙 (G.obj x✝)) ≫ adj.counit.app x✝
state_after: no goals
tactic: simp
Theorem: WeierstrassCurve.Affine.degree_polynomial
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ W.polynomial.degree = 2
state_after: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ { a := 0, b := 1, c := { a := 0, b := 0, c := W.a₁, d := W.a₃ }.toPoly,
          d := { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ }.toPoly }.toPoly.degree =
    2
tactic: rw [polynomial_eq]
state_before: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ { a := 0, b := 1, c := { a := 0, b := 0, c := W.a₁, d := W.a₃ }.toPoly,
          d := { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ }.toPoly }.toPoly.degree =
    2
state_after: no goals
tactic: exact Cubic.degree_of_b_ne_zero' one_ne_zero
Theorem: Subsemiring.coe_closure_eq
File: Mathlib/Algebra/Ring/Subsemiring/Basic.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
s : Set R
⊢ ↑(closure s) = ↑(AddSubmonoid.closure ↑(Submonoid.closure s))
state_after: no goals
tactic: simp [← Submonoid.subsemiringClosure_toAddSubmonoid, Submonoid.subsemiringClosure_eq_closure]
Theorem: TopCat.openEmbedding_iff_comp_isIso'
File: Mathlib/Topology/Category/TopCat/Basic.lean

Proof steps:
state_before: X Y Z : TopCat
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : IsIso g
⊢ OpenEmbedding ((forget TopCat).map f ≫ (forget TopCat).map g) ↔ OpenEmbedding ⇑f
state_after: X Y Z : TopCat
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : IsIso g
⊢ OpenEmbedding ((forget TopCat).map (f ≫ g)) ↔ OpenEmbedding ⇑f
tactic: simp only [← Functor.map_comp]
state_before: X Y Z : TopCat
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : IsIso g
⊢ OpenEmbedding ((forget TopCat).map (f ≫ g)) ↔ OpenEmbedding ⇑f
state_after: no goals
tactic: exact openEmbedding_iff_comp_isIso f g
Theorem: WittVector.coeff_p
File: Mathlib/RingTheory/WittVector/Identities.lean

Proof steps:
state_before: p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CharP R p
i : ℕ
⊢ (↑p).coeff i = if i = 1 then 1 else 0
state_after: case pos
p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CharP R p
i : ℕ
hi : i = 1
⊢ (↑p).coeff i = 1

case neg
p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CharP R p
i : ℕ
hi : ¬i = 1
⊢ (↑p).coeff i = 0
tactic: split_ifs with hi
Theorem: sub_eq_add
File: Mathlib/Algebra/Ring/BooleanRing.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : BooleanRing α
a b : α
⊢ a - b = a + b
state_after: no goals
tactic: rw [sub_eq_add_neg, add_right_inj, neg_eq]
Theorem: Set.preimage_const_mul_Ioc
File: Mathlib/Data/Set/Pointwise/Interval.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a b c : α
h : 0 < c
⊢ (fun x => c * x) ⁻¹' Ioc a b = Ioc (a / c) (b / c)
state_after: no goals
tactic: simp [← Ioi_inter_Iic, h]
Theorem: Real.rpow_lt_one_iff'
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

Proof steps:
state_before: x✝ y✝ z : ℝ
n : ℕ
x y : ℝ
hx : 0 ≤ x
hy : 0 < y
⊢ x ^ y < 1 ↔ x < 1
state_after: no goals
tactic: rw [← Real.rpow_lt_rpow_iff hx zero_le_one hy, Real.one_rpow]
Theorem: CategoryTheory.Limits.inr_pushoutZeroZeroIso_hom
File: Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean

Proof steps:
state_before: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : HasBinaryCoproduct X Y
⊢ pushout.inr 0 0 ≫ (pushoutZeroZeroIso X Y).hom = coprod.inr
state_after: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : HasBinaryCoproduct X Y
⊢ pushout.inr 0 0 ≫
      (colimit.isoColimitCocone
          { cocone := PushoutCocone.mk coprod.inl coprod.inr ⋯,
            isColimit :=
              isPushoutOfIsInitialIsCoproduct coprod.inl coprod.inr 0 0 HasZeroObject.zeroIsInitial
                (coprodIsCoprod X Y) }).hom =
    coprod.inr
tactic: dsimp [pushoutZeroZeroIso]
state_before: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : HasBinaryCoproduct X Y
⊢ pushout.inr 0 0 ≫
      (colimit.isoColimitCocone
          { cocone := PushoutCocone.mk coprod.inl coprod.inr ⋯,
            isColimit :=
              isPushoutOfIsInitialIsCoproduct coprod.inl coprod.inr 0 0 HasZeroObject.zeroIsInitial
                (coprodIsCoprod X Y) }).hom =
    coprod.inr
state_after: no goals
tactic: simp
Theorem: CliffordAlgebra.isUnit_ι_of_isUnit
File: Mathlib/LinearAlgebra/CliffordAlgebra/Inversion.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m : M
h : IsUnit (Q m)
⊢ IsUnit ((ι Q) m)
state_after: case intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m : M
h : IsUnit (Q m)
val✝ : Invertible (Q m)
⊢ IsUnit ((ι Q) m)
tactic: cases h.nonempty_invertible
state_before: case intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m : M
h : IsUnit (Q m)
val✝ : Invertible (Q m)
⊢ IsUnit ((ι Q) m)
state_after: case intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m : M
h : IsUnit (Q m)
val✝ : Invertible (Q m)
this : Invertible ((ι Q) m) := invertibleιOfInvertible Q m
⊢ IsUnit ((ι Q) m)
tactic: letI := invertibleιOfInvertible Q m
state_before: case intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m : M
h : IsUnit (Q m)
val✝ : Invertible (Q m)
this : Invertible ((ι Q) m) := invertibleιOfInvertible Q m
⊢ IsUnit ((ι Q) m)
state_after: no goals
tactic: exact isUnit_of_invertible (ι Q m)
Theorem: CategoryTheory.Limits.Cocone.ofCofork_ι
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
F : WalkingParallelPair ⥤ C
t : Cofork (F.map left) (F.map right)
j : WalkingParallelPair
⊢ F.obj j = (parallelPair (F.map left) (F.map right)).obj j
state_after: no goals
tactic: aesop
Theorem: Option.isSome_map
File: Mathlib/Data/Option/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
f : α → β
o : Option α
⊢ (Option.map f o).isSome = o.isSome
state_after: no goals
tactic: cases o <;> rfl
Theorem: ZFSet.IsTransitive.union
File: Mathlib/SetTheory/ZFC/Ordinal.lean

Proof steps:
state_before: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ (x ∪ y).IsTransitive
state_after: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ (⋃₀ {x, y}).IsTransitive
tactic: rw [← sUnion_pair]
state_before: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ (⋃₀ {x, y}).IsTransitive
state_after: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ ∀ z ∈ {x, y}, z.IsTransitive
tactic: apply IsTransitive.sUnion' fun z => _
state_before: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ ∀ z ∈ {x, y}, z.IsTransitive
state_after: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
z✝ : ZFSet
⊢ z✝ ∈ {x, y} → z✝.IsTransitive
tactic: intro
state_before: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
z✝ : ZFSet
⊢ z✝ ∈ {x, y} → z✝.IsTransitive
state_after: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
z✝ : ZFSet
⊢ z✝ = x ∨ z✝ = y → z✝.IsTransitive
tactic: rw [mem_pair]
state_before: x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
z✝ : ZFSet
⊢ z✝ = x ∨ z✝ = y → z✝.IsTransitive
state_after: case inl
y z : ZFSet
hy : y.IsTransitive
z✝ : ZFSet
hx : z✝.IsTransitive
⊢ z✝.IsTransitive

case inr
x z : ZFSet
hx : x.IsTransitive
z✝ : ZFSet
hy : z✝.IsTransitive
⊢ z✝.IsTransitive
tactic: rintro (rfl | rfl)
state_before: case inl
y z : ZFSet
hy : y.IsTransitive
z✝ : ZFSet
hx : z✝.IsTransitive
⊢ z✝.IsTransitive

case inr
x z : ZFSet
hx : x.IsTransitive
z✝ : ZFSet
hy : z✝.IsTransitive
⊢ z✝.IsTransitive
state_after: no goals
tactic: assumption'
Theorem: CategoryTheory.MonoidalCategory.whiskerRight_tensor_symm
File: Mathlib/CategoryTheory/Monoidal/Category.lean

Proof steps:
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z✝ X X' : C
f : X ⟶ X'
Y Z : C
⊢ f ▷ Y ▷ Z = (α_ X Y Z).hom ≫ f ▷ (Y ⊗ Z) ≫ (α_ X' Y Z).inv
state_after: no goals
tactic: simp
Theorem: Filter.isCountablyGenerated_seq
File: Mathlib/Order/Filter/Bases.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
inst✝ : Countable ι'
x : ι' → Set α
⊢ (⨅ i, 𝓟 (x i)).IsCountablyGenerated
state_after: case right
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
inst✝ : Countable ι'
x : ι' → Set α
⊢ ⨅ i, 𝓟 (x i) = generate (range x)
tactic: use range x, countable_range x
state_before: case right
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
inst✝ : Countable ι'
x : ι' → Set α
⊢ ⨅ i, 𝓟 (x i) = generate (range x)
state_after: no goals
tactic: rw [generate_eq_biInf, iInf_range]
Theorem: Real.diam_Ico
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
a b : ℝ
h : a ≤ b
⊢ Metric.diam (Ico a b) = b - a
state_after: no goals
tactic: simp [Metric.diam, ENNReal.toReal_ofReal (sub_nonneg.2 h)]
Theorem: Equiv.swapCore_swapCore
File: Mathlib/Logic/Equiv/Basic.lean

Proof steps:
state_before: α : Sort u_1
inst✝ : DecidableEq α
r a b : α
⊢ swapCore a b (swapCore a b r) = r
state_after: α : Sort u_1
inst✝ : DecidableEq α
r a b : α
⊢ (if (if r = a then b else if r = b then a else r) = a then b
    else if (if r = a then b else if r = b then a else r) = b then a else if r = a then b else if r = b then a else r) =
    r
tactic: unfold swapCore
state_before: α : Sort u_1
inst✝ : DecidableEq α
r a b : α
⊢ (if (if r = a then b else if r = b then a else r) = a then b
    else if (if r = a then b else if r = b then a else r) = b then a else if r = a then b else if r = b then a else r) =
    r
state_after: no goals
tactic: split_ifs <;> cc
Theorem: EuclideanGeometry.sin_angle_of_angle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ∠ p₁ p₂ p₃ = π / 2
h0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂
⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ⟪p₂ -ᵥ p₃, p₁ -ᵥ p₂⟫_ℝ = 0
h0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂
⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃
tactic: rw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ←
    inner_neg_left, neg_vsub_eq_vsub_rev] at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ⟪p₂ -ᵥ p₃, p₁ -ᵥ p₂⟫_ℝ = 0
h0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂
⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ⟪p₂ -ᵥ p₃, p₁ -ᵥ p₂⟫_ℝ = 0
h0 : p₂ -ᵥ p₃ ≠ 0 ∨ p₁ -ᵥ p₂ ≠ 0
⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃
tactic: rw [← @vsub_ne_zero V, @ne_comm _ p₃, ← @vsub_ne_zero V _ _ _ p₂, or_comm] at h0
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ⟪p₂ -ᵥ p₃, p₁ -ᵥ p₂⟫_ℝ = 0
h0 : p₂ -ᵥ p₃ ≠ 0 ∨ p₁ -ᵥ p₂ ≠ 0
⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃
state_after: no goals
tactic: rw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃,
    add_comm, sin_angle_add_of_inner_eq_zero h h0]
Theorem: Real.sin_arccos
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

Proof steps:
state_before: x✝ y x : ℝ
⊢ sin (arccos x) = √(1 - x ^ 2)
state_after: case pos
x✝ y x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arccos x) = √(1 - x ^ 2)

case neg
x✝ y x : ℝ
hx₁ : ¬-1 ≤ x
⊢ sin (arccos x) = √(1 - x ^ 2)
tactic: by_cases hx₁ : -1 ≤ x
state_before: case pos
x✝ y x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arccos x) = √(1 - x ^ 2)

case neg
x✝ y x : ℝ
hx₁ : ¬-1 ≤ x
⊢ sin (arccos x) = √(1 - x ^ 2)
state_after: case neg
x✝ y x : ℝ
hx₁ : ¬-1 ≤ x
⊢ sin (arccos x) = √(1 - x ^ 2)

case pos
x✝ y x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arccos x) = √(1 - x ^ 2)
tactic: swap
state_before: case pos
x✝ y x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arccos x) = √(1 - x ^ 2)
state_after: case pos
x✝ y x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ sin (arccos x) = √(1 - x ^ 2)

case neg
x✝ y x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
⊢ sin (arccos x) = √(1 - x ^ 2)
tactic: by_cases hx₂ : x ≤ 1
state_before: case pos
x✝ y x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ sin (arccos x) = √(1 - x ^ 2)

case neg
x✝ y x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
⊢ sin (arccos x) = √(1 - x ^ 2)
state_after: case neg
x✝ y x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
⊢ sin (arccos x) = √(1 - x ^ 2)

case pos
x✝ y x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ sin (arccos x) = √(1 - x ^ 2)
tactic: swap
state_before: case pos
x✝ y x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ sin (arccos x) = √(1 - x ^ 2)
state_after: no goals
tactic: rw [arccos_eq_pi_div_two_sub_arcsin, sin_pi_div_two_sub, cos_arcsin]
Theorem: Cardinal.lsub_lt_ord_lift_of_isRegular
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

Proof steps:
state_before: α : Type u_1
r : α → α → Prop
ι : Type u
f : ι → Ordinal.{max u v}
c : Cardinal.{max u v}
hc : c.IsRegular
hι : lift.{v, u} #ι < c
⊢ lift.{v, u} #ι < c.ord.cof
state_after: no goals
tactic: rwa [hc.cof_eq]
Theorem: Filter.eventually_atTop_curry
File: Mathlib/Order/Filter/AtTopBot.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
p : α × β → Prop
hp : ∀ᶠ (x : α × β) in atTop, p x
⊢ ∀ᶠ (k : α) in atTop, ∀ᶠ (l : β) in atTop, p (k, l)
state_after: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
p : α × β → Prop
hp : ∀ᶠ (x : α × β) in atTop ×ˢ atTop, p x
⊢ ∀ᶠ (k : α) in atTop, ∀ᶠ (l : β) in atTop, p (k, l)
tactic: rw [← prod_atTop_atTop_eq] at hp
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
p : α × β → Prop
hp : ∀ᶠ (x : α × β) in atTop ×ˢ atTop, p x
⊢ ∀ᶠ (k : α) in atTop, ∀ᶠ (l : β) in atTop, p (k, l)
state_after: no goals
tactic: exact hp.curry
Theorem: Submodule.map_le_smul_top
File: Mathlib/RingTheory/Ideal/Operations.lean

Proof steps:
state_before: R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I✝ J : Ideal R
N P : Submodule R M
I : Ideal R
f : R →ₗ[R] M
⊢ map f I ≤ I • ⊤
state_after: case intro.intro
R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I✝ J : Ideal R
N P : Submodule R M
I : Ideal R
f : R →ₗ[R] M
y : R
hy : y ∈ ↑I
⊢ f y ∈ I • ⊤
tactic: rintro _ ⟨y, hy, rfl⟩
state_before: case intro.intro
R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I✝ J : Ideal R
N P : Submodule R M
I : Ideal R
f : R →ₗ[R] M
y : R
hy : y ∈ ↑I
⊢ f y ∈ I • ⊤
state_after: case intro.intro
R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I✝ J : Ideal R
N P : Submodule R M
I : Ideal R
f : R →ₗ[R] M
y : R
hy : y ∈ ↑I
⊢ y • f 1 ∈ I • ⊤
tactic: rw [← mul_one y, ← smul_eq_mul, f.map_smul]
state_before: case intro.intro
R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I✝ J : Ideal R
N P : Submodule R M
I : Ideal R
f : R →ₗ[R] M
y : R
hy : y ∈ ↑I
⊢ y • f 1 ∈ I • ⊤
state_after: no goals
tactic: exact smul_mem_smul hy mem_top
Theorem: FreeCommRing.lift_comp_of
File: Mathlib/RingTheory/FreeCommRing.lean

Proof steps:
state_before: α : Type u
R : Type v
inst✝ : CommRing R
f✝ : α → R
f : FreeCommRing α →+* R
x : FreeCommRing α
⊢ (lift (⇑f ∘ of)) (-1) = f (-1)
state_after: no goals
tactic: rw [RingHom.map_neg, RingHom.map_one, f.map_neg, f.map_one]
state_before: α : Type u
R : Type v
inst✝ : CommRing R
f✝ : α → R
f : FreeCommRing α →+* R
x✝ x y : FreeCommRing α
ihx : (lift (⇑f ∘ of)) x = f x
ihy : (lift (⇑f ∘ of)) y = f y
⊢ (lift (⇑f ∘ of)) (x + y) = f (x + y)
state_after: no goals
tactic: rw [RingHom.map_add, f.map_add, ihx, ihy]
state_before: α : Type u
R : Type v
inst✝ : CommRing R
f✝ : α → R
f : FreeCommRing α →+* R
x✝ x y : FreeCommRing α
ihx : (lift (⇑f ∘ of)) x = f x
ihy : (lift (⇑f ∘ of)) y = f y
⊢ (lift (⇑f ∘ of)) (x * y) = f (x * y)
state_after: no goals
tactic: rw [RingHom.map_mul, f.map_mul, ihx, ihy]
Theorem: Finset.sum_Ico_succ_top
File: Mathlib/Algebra/BigOperators/Intervals.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
inst✝ : CommMonoid M
s₂ s₁ s : Finset α
a✝ : α
g f✝ : α → M
a b : ℕ
hab : a ≤ b
f : ℕ → M
⊢ ∏ k ∈ Ico a (b + 1), f k = (∏ k ∈ Ico a b, f k) * f b
state_after: no goals
tactic: rw [Nat.Ico_succ_right_eq_insert_Ico hab, prod_insert right_not_mem_Ico, mul_comm]