1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: AddMonoid.IsTorsion.module_of_torsion
File: Mathlib/GroupTheory/Torsion.lean

tactic: obtain ⟨n, npos, hn⟩ := (tR 1).exists_nsmul_eq_zero
state_before: G : Type u_1
H : Type u_2
R : Type u_3
M : Type u_4
inst✝² : AddCommMonoid M
inst✝¹ : Semiring R
inst✝ : Module R M
tR : IsTorsion R
f : M
⊢ ∃ n, 0 < n ∧ n • f = 0
state_after: case intro.intro
G : Type u_1
H : Type u_2
R : Type u_3
M : Type u_4
inst✝² : AddCommMonoid M
inst✝¹ : Semiring R
inst✝ : Module R M
tR : IsTorsion R
f : M
n : ℕ
npos : 0 < n
hn : n • 1 = 0
⊢ ∃ n, 0 < n ∧ n • f = 0

tactic: exact ⟨n, npos, by simp only [nsmul_eq_smul_cast R _ f, ← nsmul_one, hn, zero_smul]⟩
state_before: case intro.intro
G : Type u_1
H : Type u_2
R : Type u_3
M : Type u_4
inst✝² : AddCommMonoid M
inst✝¹ : Semiring R
inst✝ : Module R M
tR : IsTorsion R
f : M
n : ℕ
npos : 0 < n
hn : n • 1 = 0
⊢ ∃ n, 0 < n ∧ n • f = 0
state_after: no goals

tactic: simp only [nsmul_eq_smul_cast R _ f, ← nsmul_one, hn, zero_smul]
state_before: G : Type u_1
H : Type u_2
R : Type u_3
M : Type u_4
inst✝² : AddCommMonoid M
inst✝¹ : Semiring R
inst✝ : Module R M
tR : IsTorsion R
f : M
n : ℕ
npos : 0 < n
hn : n • 1 = 0
⊢ n • f = 0
state_after: no goals
Theorem: Matrix.adjugate_conjTranspose
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: dsimp only [conjTranspose]
state_before: m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
inst✝ : StarRing α
A : Matrix n n α
⊢ A.adjugateᴴ = Aᴴ.adjugate
state_after: m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
inst✝ : StarRing α
A : Matrix n n α
⊢ A.adjugateᵀ.map star = (Aᵀ.map star).adjugate

tactic: have : Aᵀ.adjugate.map star = adjugate (Aᵀ.map star) := (starRingEnd α).map_adjugate Aᵀ
state_before: m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
inst✝ : StarRing α
A : Matrix n n α
⊢ A.adjugateᵀ.map star = (Aᵀ.map star).adjugate
state_after: m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
inst✝ : StarRing α
A : Matrix n n α
this : Aᵀ.adjugate.map star = (Aᵀ.map star).adjugate
⊢ A.adjugateᵀ.map star = (Aᵀ.map star).adjugate

tactic: rw [A.adjugate_transpose, this]
state_before: m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
inst✝ : StarRing α
A : Matrix n n α
this : Aᵀ.adjugate.map star = (Aᵀ.map star).adjugate
⊢ A.adjugateᵀ.map star = (Aᵀ.map star).adjugate
state_after: no goals
Theorem: Ideal.IsHomogeneous.top
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean

tactic: simp only [Submodule.mem_top]
state_before: ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : Semiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
i : ι
r : A
x✝ : r ∈ ⊤
⊢ ↑(((decompose 𝒜) r) i) ∈ ⊤
state_after: no goals
Theorem: Finset.product_eq_empty
File: Mathlib/Data/Finset/Prod.lean

tactic: rw [← not_nonempty_iff_eq_empty, nonempty_product, not_and_or, not_nonempty_iff_eq_empty,
  not_nonempty_iff_eq_empty]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s✝ s' : Finset α
t✝ t' : Finset β
a : α
b : β
s : Finset α
t : Finset β
⊢ s ×ˢ t = ∅ ↔ s = ∅ ∨ t = ∅
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_union_add_inter'
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: simpa only [union_comm, inter_comm, add_comm] using restrict_union_add_inter t hs
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t✝ : Set α
hs : MeasurableSet s
t : Set α
⊢ μ.restrict (s ∪ t) + μ.restrict (s ∩ t) = μ.restrict s + μ.restrict t
state_after: no goals
Theorem: TopCat.inducing_prod_map
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

tactic: constructor
state_before: J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ Inducing ⇑(prod.map f g)
state_after: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ (W ⨯ Y).topologicalSpace_coe = induced (⇑(prod.map f g)) (X ⨯ Z).topologicalSpace_coe

tactic: simp_rw [topologicalSpace_coe, prod_topology, induced_inf, induced_compose, ← coe_comp,
  prod.map_fst, prod.map_snd, coe_comp, ← induced_compose (g := f), ← induced_compose (g := g)]
state_before: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ (W ⨯ Y).topologicalSpace_coe = induced (⇑(prod.map f g)) (X ⨯ Z).topologicalSpace_coe
state_after: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ induced (⇑prod.fst) W.str ⊓ induced (⇑prod.snd) Y.str =
    induced (⇑prod.fst) (induced (⇑f) X.str) ⊓ induced (⇑prod.snd) (induced (⇑g) Z.str)

tactic: erw [← hf.induced, ← hg.induced]
state_before: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ induced (⇑prod.fst) W.str ⊓ induced (⇑prod.snd) Y.str =
    induced (⇑prod.fst) (induced (⇑f) X.str) ⊓ induced (⇑prod.snd) (induced (⇑g) Z.str)
state_after: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ induced (⇑prod.fst) W.str ⊓ induced (⇑prod.snd) Y.str =
    induced (⇑prod.fst) W.topologicalSpace_coe ⊓ induced (⇑prod.snd) Y.topologicalSpace_coe

tactic: rfl
state_before: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ induced (⇑prod.fst) W.str ⊓ induced (⇑prod.snd) Y.str =
    induced (⇑prod.fst) W.topologicalSpace_coe ⊓ induced (⇑prod.snd) Y.topologicalSpace_coe
state_after: no goals
Theorem: zpow_abs_eq_one
File: Mathlib/Algebra/Order/Group/Int.lean

tactic: rw [← Int.natCast_natAbs, zpow_natCast, pow_natAbs_eq_one]
state_before: G : Type u_1
inst✝ : Group G
a : G
n : ℤ
⊢ a ^ |n| = 1 ↔ a ^ n = 1
state_after: no goals
Theorem: Option.map_map₂_distrib_right
File: Mathlib/Data/Option/NAry.lean

tactic: cases a <;> cases b <;> simp [h_distrib]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
f : α → β → γ
a : Option α
b : Option β
c : Option γ
α' : Type u_5
β' : Type u_6
δ' : Type u_7
ε : Type u_8
ε' : Type u_9
g : γ → δ
f' : α → β' → δ
g' : β → β'
h_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)
⊢ Option.map g (map₂ f a b) = map₂ f' a (Option.map g' b)
state_after: no goals
Theorem: HomologicalComplex.iCycles_d
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

tactic: by_cases hij : c.Rel i j
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝ : K.HasHomology i
⊢ K.iCycles i ≫ K.d i j = 0
state_after: case pos
C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝ : K.HasHomology i
hij : c.Rel i j
⊢ K.iCycles i ≫ K.d i j = 0

case neg
C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝ : K.HasHomology i
hij : ¬c.Rel i j
⊢ K.iCycles i ≫ K.d i j = 0

tactic: obtain rfl := c.next_eq' hij
state_before: case pos
C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝ : K.HasHomology i
hij : c.Rel i j
⊢ K.iCycles i ≫ K.d i j = 0
state_after: case pos
C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i k : ι
inst✝ : K.HasHomology i
hij : c.Rel i (c.next i)
⊢ K.iCycles i ≫ K.d i (c.next i) = 0

tactic: exact (K.sc i).iCycles_g
state_before: case pos
C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i k : ι
inst✝ : K.HasHomology i
hij : c.Rel i (c.next i)
⊢ K.iCycles i ≫ K.d i (c.next i) = 0
state_after: no goals

tactic: rw [K.shape _ _ hij, comp_zero]
state_before: case neg
C : Type u_1
inst✝² : Category.{u_3, u_1} C
inst✝¹ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝ : K.HasHomology i
hij : ¬c.Rel i j
⊢ K.iCycles i ≫ K.d i j = 0
state_after: no goals
Theorem: CharP.intCast_eq_zero_iff
File: Mathlib/Algebra/CharP/Defs.lean

tactic: rcases lt_trichotomy a 0 with (h | rfl | h)
state_before: R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b a : ℤ
⊢ ↑a = 0 ↔ ↑p ∣ a
state_after: case inl
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b a : ℤ
h : a < 0
⊢ ↑a = 0 ↔ ↑p ∣ a

case inr.inl
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a b : ℤ
⊢ ↑0 = 0 ↔ ↑p ∣ 0

case inr.inr
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b a : ℤ
h : 0 < a
⊢ ↑a = 0 ↔ ↑p ∣ a

tactic: rw [← neg_eq_zero, ← Int.cast_neg, ← dvd_neg]
state_before: case inl
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b a : ℤ
h : a < 0
⊢ ↑a = 0 ↔ ↑p ∣ a
state_after: case inl
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b a : ℤ
h : a < 0
⊢ ↑(-a) = 0 ↔ ↑p ∣ -a

tactic: lift -a to ℕ using neg_nonneg.mpr (le_of_lt h) with b
state_before: case inl
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b a : ℤ
h : a < 0
⊢ ↑(-a) = 0 ↔ ↑p ∣ -a
state_after: case inl.intro
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b✝ a : ℤ
h : a < 0
b : ℕ
⊢ ↑↑b = 0 ↔ ↑p ∣ ↑b

tactic: rw [Int.cast_natCast, CharP.cast_eq_zero_iff R p, Int.natCast_dvd_natCast]
state_before: case inl.intro
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b✝ a : ℤ
h : a < 0
b : ℕ
⊢ ↑↑b = 0 ↔ ↑p ∣ ↑b
state_after: no goals

tactic: simp only [Int.cast_zero, eq_self_iff_true, dvd_zero]
state_before: case inr.inl
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a b : ℤ
⊢ ↑0 = 0 ↔ ↑p ∣ 0
state_after: no goals

tactic: lift a to ℕ using le_of_lt h with b
state_before: case inr.inr
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b a : ℤ
h : 0 < a
⊢ ↑a = 0 ↔ ↑p ∣ a
state_after: case inr.inr.intro
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b✝ a : ℤ
b : ℕ
h✝ h : 0 < ↑b
⊢ ↑↑b = 0 ↔ ↑p ∣ ↑b

tactic: rw [Int.cast_natCast, CharP.cast_eq_zero_iff R p, Int.natCast_dvd_natCast]
state_before: case inr.inr.intro
R : Type u_1
inst✝¹ : AddGroupWithOne R
p : ℕ
inst✝ : CharP R p
a✝ b✝ a : ℤ
b : ℕ
h✝ h : 0 < ↑b
⊢ ↑↑b = 0 ↔ ↑p ∣ ↑b
state_after: no goals
Theorem: Polynomial.irreducible_iff_lt_natDegree_lt
File: Mathlib/Algebra/Polynomial/FieldDivision.lean

tactic: have : p * C (leadingCoeff p)⁻¹ ≠ 1 := by
  contrapose! hpu
  exact isUnit_of_mul_eq_one _ _ hpu
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hp0 : p ≠ 0
hpu : ¬IsUnit p
⊢ Irreducible p ↔ ∀ (q : R[X]), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p
state_after: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hp0 : p ≠ 0
hpu : ¬IsUnit p
this : p * C p.leadingCoeff⁻¹ ≠ 1
⊢ Irreducible p ↔ ∀ (q : R[X]), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p

tactic: rw [← irreducible_mul_leadingCoeff_inv,
    (monic_mul_leadingCoeff_inv hp0).irreducible_iff_lt_natDegree_lt this,
    natDegree_mul_leadingCoeff_inv _ hp0]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hp0 : p ≠ 0
hpu : ¬IsUnit p
this : p * C p.leadingCoeff⁻¹ ≠ 1
⊢ Irreducible p ↔ ∀ (q : R[X]), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p
state_after: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hp0 : p ≠ 0
hpu : ¬IsUnit p
this : p * C p.leadingCoeff⁻¹ ≠ 1
⊢ (∀ (q : R[X]), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p * C p.leadingCoeff⁻¹) ↔
    ∀ (q : R[X]), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p

tactic: simp only [IsUnit.dvd_mul_right
  (isUnit_C.mpr (IsUnit.mk0 (leadingCoeff p)⁻¹ (inv_ne_zero (leadingCoeff_ne_zero.mpr hp0))))]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hp0 : p ≠ 0
hpu : ¬IsUnit p
this : p * C p.leadingCoeff⁻¹ ≠ 1
⊢ (∀ (q : R[X]), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p * C p.leadingCoeff⁻¹) ↔
    ∀ (q : R[X]), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p
state_after: no goals

tactic: contrapose! hpu
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hp0 : p ≠ 0
hpu : ¬IsUnit p
⊢ p * C p.leadingCoeff⁻¹ ≠ 1
state_after: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hp0 : p ≠ 0
hpu : p * C p.leadingCoeff⁻¹ = 1
⊢ IsUnit p

tactic: exact isUnit_of_mul_eq_one _ _ hpu
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hp0 : p ≠ 0
hpu : p * C p.leadingCoeff⁻¹ = 1
⊢ IsUnit p
state_after: no goals
Theorem: Set.Ici_iSup
File: Mathlib/Data/Set/Lattice.lean

tactic: simp only [mem_Ici, iSup_le_iff, mem_iInter]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
inst✝ : CompleteLattice α
f : ι → α
x✝ : α
⊢ x✝ ∈ Ici (⨆ i, f i) ↔ x✝ ∈ ⋂ i, Ici (f i)
state_after: no goals
Theorem: AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.inv_invApp
File: Mathlib/Geometry/RingedSpace/OpenImmersion.lean

tactic: simp [Opens.map, Set.preimage_image_eq _ H.base_open.inj]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ (Opens.map f.base).op.obj { unop := (opensFunctor f).obj U } = { unop := U }
state_after: no goals

tactic: rw [← cancel_epi (H.invApp U), IsIso.hom_inv_id]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ inv (invApp f U) = f.c.app { unop := (opensFunctor f).obj U } ≫ X.presheaf.map (eqToHom ⋯)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ 𝟙 (X.presheaf.obj { unop := U }) =
    invApp f U ≫ f.c.app { unop := (opensFunctor f).obj U } ≫ X.presheaf.map (eqToHom ⋯)

tactic: delta invApp
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ 𝟙 (X.presheaf.obj { unop := U }) =
    invApp f U ≫ f.c.app { unop := (opensFunctor f).obj U } ≫ X.presheaf.map (eqToHom ⋯)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ 𝟙 (X.presheaf.obj { unop := U }) =
    (X.presheaf.map (eqToHom ⋯) ≫ inv (f.c.app { unop := (opensFunctor f).obj U })) ≫
      f.c.app { unop := (opensFunctor f).obj U } ≫ X.presheaf.map (eqToHom ⋯)

tactic: simp [← Functor.map_comp]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ 𝟙 (X.presheaf.obj { unop := U }) =
    (X.presheaf.map (eqToHom ⋯) ≫ inv (f.c.app { unop := (opensFunctor f).obj U })) ≫
      f.c.app { unop := (opensFunctor f).obj U } ≫ X.presheaf.map (eqToHom ⋯)
state_after: no goals
Theorem: SetTheory.PGame.lf_zero
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [lf_def]
state_before: xl xr : Type u
x : PGame
⊢ x ⧏ 0 ↔ ∃ j, ∀ (i : (x.moveRight j).LeftMoves), (x.moveRight j).moveLeft i ⧏ 0
state_after: xl xr : Type u
x : PGame
⊢ ((∃ i,
        (∀ (i' : x.LeftMoves), x.moveLeft i' ⧏ moveLeft 0 i) ∧
          ∀ (j : (moveLeft 0 i).RightMoves), x ⧏ (moveLeft 0 i).moveRight j) ∨
      ∃ j,
        (∀ (i : (x.moveRight j).LeftMoves), (x.moveRight j).moveLeft i ⧏ 0) ∧
          ∀ (j' : RightMoves 0), x.moveRight j ⧏ moveRight 0 j') ↔
    ∃ j, ∀ (i : (x.moveRight j).LeftMoves), (x.moveRight j).moveLeft i ⧏ 0

tactic: simp
state_before: xl xr : Type u
x : PGame
⊢ ((∃ i,
        (∀ (i' : x.LeftMoves), x.moveLeft i' ⧏ moveLeft 0 i) ∧
          ∀ (j : (moveLeft 0 i).RightMoves), x ⧏ (moveLeft 0 i).moveRight j) ∨
      ∃ j,
        (∀ (i : (x.moveRight j).LeftMoves), (x.moveRight j).moveLeft i ⧏ 0) ∧
          ∀ (j' : RightMoves 0), x.moveRight j ⧏ moveRight 0 j') ↔
    ∃ j, ∀ (i : (x.moveRight j).LeftMoves), (x.moveRight j).moveLeft i ⧏ 0
state_after: no goals
Theorem: List.length_eraseIdx_add_one
File: Mathlib/Data/List/Basic.lean

tactic: rw [eraseIdx_eq_take_drop_succ]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
l : List ι
i : ℕ
h : i < l.length
⊢ (l.eraseIdx i).length + 1 = (take i l ++ drop (i + 1) l).length + 1
state_after: no goals

tactic: rw [length_append]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
l : List ι
i : ℕ
h : i < l.length
⊢ (take i l ++ drop (i + 1) l).length + 1 = (take i l).length + (drop (i + 1) l).length + 1
state_after: no goals

tactic: rw [length_take_of_le (le_of_lt h)]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
l : List ι
i : ℕ
h : i < l.length
⊢ (take i l).length + (drop (i + 1) l).length + 1 = i + (drop (i + 1) l).length + 1
state_after: no goals

tactic: rw [length_drop]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
l : List ι
i : ℕ
h : i < l.length
⊢ i + (drop (i + 1) l).length + 1 = i + (l.length - (i + 1)) + 1
state_after: no goals

tactic: omega
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : DecidableEq α
l : List ι
i : ℕ
h : i < l.length
⊢ i + (l.length - (i + 1)) + 1 = i + 1 + (l.length - (i + 1))
state_after: no goals
Theorem: Rat.MulRingNorm.eq_on_nat_iff_eq_on_Int
File: Mathlib/NumberTheory/Ostrowski.lean

tactic: refine ⟨fun h z ↦ ?_, fun a n ↦ a n⟩
state_before: f g : MulRingNorm ℚ
⊢ (∀ (n : ℕ), f ↑n = g ↑n) ↔ ∀ (n : ℤ), f ↑n = g ↑n
state_after: f g : MulRingNorm ℚ
h : ∀ (n : ℕ), f ↑n = g ↑n
z : ℤ
⊢ f ↑z = g ↑z

tactic: obtain ⟨n , rfl | rfl⟩ := eq_nat_or_neg z <;>
simp only [Int.cast_neg, Int.cast_natCast, map_neg_eq_map, h n]
state_before: f g : MulRingNorm ℚ
h : ∀ (n : ℕ), f ↑n = g ↑n
z : ℤ
⊢ f ↑z = g ↑z
state_after: no goals
Theorem: Set.preimage_const_mul_Ico_of_neg
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simpa only [mul_comm] using preimage_mul_const_Ico_of_neg a b h
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a b c : α
h : c < 0
⊢ (fun x => c * x) ⁻¹' Ico a b = Ioc (b / c) (a / c)
state_after: no goals
Theorem: CategoryTheory.MorphismProperty.ext
File: Mathlib/CategoryTheory/MorphismProperty/Basic.lean

tactic: funext X Y f
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.2136, u_1} D
W W' : MorphismProperty C
h : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), W f ↔ W' f
⊢ W = W'
state_after: case h.h.h
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.2136, u_1} D
W W' : MorphismProperty C
h : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), W f ↔ W' f
X Y : C
f : X ⟶ Y
⊢ W f = W' f

tactic: rw [h]
state_before: case h.h.h
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.2136, u_1} D
W W' : MorphismProperty C
h : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), W f ↔ W' f
X Y : C
f : X ⟶ Y
⊢ W f = W' f
state_after: no goals
Theorem: StarAlgHom.snd_prod
File: Mathlib/Algebra/Star/StarAlgHom.lean

tactic: ext
state_before: R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Star A
inst✝⁵ : Semiring B
inst✝⁴ : Algebra R B
inst✝³ : Star B
inst✝² : Semiring C
inst✝¹ : Algebra R C
inst✝ : Star C
f : A →⋆ₐ[R] B
g : A →⋆ₐ[R] C
⊢ (snd R B C).comp (f.prod g) = g
state_after: case h
R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Star A
inst✝⁵ : Semiring B
inst✝⁴ : Algebra R B
inst✝³ : Star B
inst✝² : Semiring C
inst✝¹ : Algebra R C
inst✝ : Star C
f : A →⋆ₐ[R] B
g : A →⋆ₐ[R] C
x✝ : A
⊢ ((snd R B C).comp (f.prod g)) x✝ = g x✝

tactic: rfl
state_before: case h
R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Star A
inst✝⁵ : Semiring B
inst✝⁴ : Algebra R B
inst✝³ : Star B
inst✝² : Semiring C
inst✝¹ : Algebra R C
inst✝ : Star C
f : A →⋆ₐ[R] B
g : A →⋆ₐ[R] C
x✝ : A
⊢ ((snd R B C).comp (f.prod g)) x✝ = g x✝
state_after: no goals
Theorem: Complex.cpow_inv_two_im_eq_sqrt
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [← ofReal_ofNat, ← ofReal_inv, cpow_ofReal_im, ← div_eq_mul_inv, ← one_div,
  ← Real.sqrt_eq_rpow, sin_half_eq_sqrt, ← sqrt_mul (abs.nonneg _), ← mul_div_assoc, mul_sub,
  mul_one, abs_mul_cos_arg]
state_before: x : ℂ
hx : 0 ≤ x.im
⊢ (x ^ 2⁻¹).im = √((abs x - x.re) / 2)
state_after: case hl
x : ℂ
hx : 0 ≤ x.im
⊢ 0 ≤ x.arg

case hr
x : ℂ
hx : 0 ≤ x.im
⊢ x.arg ≤ 2 * π

tactic: rwa [arg_nonneg_iff]
state_before: case hl
x : ℂ
hx : 0 ≤ x.im
⊢ 0 ≤ x.arg
state_after: no goals

tactic: linarith [pi_pos, arg_le_pi x]
state_before: case hr
x : ℂ
hx : 0 ≤ x.im
⊢ x.arg ≤ 2 * π
state_after: no goals
Theorem: Nat.div_left_inj
File: Mathlib/Data/Nat/Defs.lean

tactic: refine ⟨fun h ↦ ?_, congrArg fun b ↦ b / d⟩
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hda : d ∣ a
hdb : d ∣ b
⊢ a / d = b / d ↔ a = b
state_after: a b c d m n k : ℕ
p q : ℕ → Prop
hda : d ∣ a
hdb : d ∣ b
h : a / d = b / d
⊢ a = b

tactic: rw [← Nat.mul_div_cancel' hda, ← Nat.mul_div_cancel' hdb, h]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hda : d ∣ a
hdb : d ∣ b
h : a / d = b / d
⊢ a = b
state_after: no goals
Theorem: Associated.irreducible
File: Mathlib/Algebra/Associated.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
⊢ p = p * ↑u * ↑u⁻¹
state_after: no goals

tactic: rw [hu]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
⊢ p * ↑u * ↑u⁻¹ = a * (b * ↑u⁻¹)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
⊢ q * ↑u⁻¹ = a * (b * ↑u⁻¹)

tactic: simp [hab, mul_assoc]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
⊢ q * ↑u⁻¹ = a * (b * ↑u⁻¹)
state_after: no goals

tactic: simp [hv]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
hpab : p = a * (b * ↑u⁻¹)
x✝ : IsUnit (b * ↑u⁻¹)
v : αˣ
hv : ↑v = b * ↑u⁻¹
⊢ ↑(v * u) = b
state_after: no goals
Theorem: Complex.ofReal_cpow
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: simp only [Real.rpow_def_of_nonneg hx, Complex.cpow_def, ofReal_eq_zero]
state_before: x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ ↑(x ^ y) = ↑x ^ ↑y
state_after: x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ ↑(if x = 0 then if y = 0 then 1 else 0 else rexp (Real.log x * y)) =
    if x = 0 then if y = 0 then 1 else 0 else cexp (log ↑x * ↑y)

tactic: split_ifs <;>
simp [Complex.ofReal_log hx]
state_before: x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ ↑(if x = 0 then if y = 0 then 1 else 0 else rexp (Real.log x * y)) =
    if x = 0 then if y = 0 then 1 else 0 else cexp (log ↑x * ↑y)
state_after: no goals