1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: ZMod.euler_criterion
File: Mathlib/NumberTheory/LegendreSymbol/Basic.lean

tactic: apply (iff_congr _ (by simp [Units.ext_iff])).mp (euler_criterion_units p (Units.mk0 a ha))
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ IsSquare a ↔ a ^ (p / 2) = 1
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ (∃ y, y ^ 2 = Units.mk0 a ha) ↔ IsSquare a

tactic: simp only [Units.ext_iff, sq, Units.val_mk0, Units.val_mul]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ (∃ y, y ^ 2 = Units.mk0 a ha) ↔ IsSquare a
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ (∃ y, ↑y * ↑y = a) ↔ IsSquare a

tactic: constructor
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ (∃ y, ↑y * ↑y = a) ↔ IsSquare a
state_after: case mp
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ (∃ y, ↑y * ↑y = a) → IsSquare a

case mpr
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ IsSquare a → ∃ y, ↑y * ↑y = a

tactic: simp [Units.ext_iff]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ Units.mk0 a ha ^ (p / 2) = 1 ↔ a ^ (p / 2) = 1
state_after: no goals

tactic: rintro ⟨y, hy⟩
state_before: case mp
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ (∃ y, ↑y * ↑y = a) → IsSquare a
state_after: case mp.intro
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
y : (ZMod p)ˣ
hy : ↑y * ↑y = a
⊢ IsSquare a

tactic: exact ⟨y, hy.symm⟩
state_before: case mp.intro
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
y : (ZMod p)ˣ
hy : ↑y * ↑y = a
⊢ IsSquare a
state_after: no goals

tactic: rintro ⟨y, rfl⟩
state_before: case mpr
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ IsSquare a → ∃ y, ↑y * ↑y = a
state_after: case mpr.intro
p : ℕ
inst✝ : Fact (Nat.Prime p)
y : ZMod p
ha : y * y ≠ 0
⊢ ∃ y_1, ↑y_1 * ↑y_1 = y * y

tactic: have hy : y ≠ 0 := by
  rintro rfl
  simp [zero_pow, mul_zero, ne_eq, not_true] at ha
state_before: case mpr.intro
p : ℕ
inst✝ : Fact (Nat.Prime p)
y : ZMod p
ha : y * y ≠ 0
⊢ ∃ y_1, ↑y_1 * ↑y_1 = y * y
state_after: case mpr.intro
p : ℕ
inst✝ : Fact (Nat.Prime p)
y : ZMod p
ha : y * y ≠ 0
hy : y ≠ 0
⊢ ∃ y_1, ↑y_1 * ↑y_1 = y * y

tactic: refine ⟨Units.mk0 y hy, ?_⟩
state_before: case mpr.intro
p : ℕ
inst✝ : Fact (Nat.Prime p)
y : ZMod p
ha : y * y ≠ 0
hy : y ≠ 0
⊢ ∃ y_1, ↑y_1 * ↑y_1 = y * y
state_after: case mpr.intro
p : ℕ
inst✝ : Fact (Nat.Prime p)
y : ZMod p
ha : y * y ≠ 0
hy : y ≠ 0
⊢ ↑(Units.mk0 y hy) * ↑(Units.mk0 y hy) = y * y

tactic: simp
state_before: case mpr.intro
p : ℕ
inst✝ : Fact (Nat.Prime p)
y : ZMod p
ha : y * y ≠ 0
hy : y ≠ 0
⊢ ↑(Units.mk0 y hy) * ↑(Units.mk0 y hy) = y * y
state_after: no goals

tactic: rintro rfl
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
y : ZMod p
ha : y * y ≠ 0
⊢ y ≠ 0
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
ha : 0 * 0 ≠ 0
⊢ False

tactic: simp [zero_pow, mul_zero, ne_eq, not_true] at ha
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
ha : 0 * 0 ≠ 0
⊢ False
state_after: no goals
Theorem: RingHom.ker_equiv
File: Mathlib/RingTheory/Ideal/Maps.lean

tactic: simpa only [← injective_iff_ker_eq_bot] using EquivLike.injective f
state_before: R : Type u
S : Type v
T : Type w
F : Type u_1
inst✝⁴ : Ring R
inst✝³ : Semiring S
inst✝² : FunLike F R S
rc : RingHomClass F R S
f✝ : F
F' : Type u_2
inst✝¹ : EquivLike F' R S
inst✝ : RingEquivClass F' R S
f : F'
⊢ ker f = ⊥
state_after: no goals
Theorem: ZFSet.mem_pairSep
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: refine mem_sep.trans ⟨And.right, fun e => ⟨?_, e⟩⟩
state_before: p : ZFSet → ZFSet → Prop
x y z : ZFSet
⊢ z ∈ pairSep p x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = a.pair b ∧ p a b
state_after: p : ZFSet → ZFSet → Prop
x y z : ZFSet
e : ∃ a ∈ x, ∃ b ∈ y, z = a.pair b ∧ p a b
⊢ z ∈ (x ∪ y).powerset.powerset

tactic: rcases e with ⟨a, ax, b, bY, rfl, pab⟩
state_before: p : ZFSet → ZFSet → Prop
x y z : ZFSet
e : ∃ a ∈ x, ∃ b ∈ y, z = a.pair b ∧ p a b
⊢ z ∈ (x ∪ y).powerset.powerset
state_after: case intro.intro.intro.intro.intro
p : ZFSet → ZFSet → Prop
x y a : ZFSet
ax : a ∈ x
b : ZFSet
bY : b ∈ y
pab : p a b
⊢ a.pair b ∈ (x ∪ y).powerset.powerset

tactic: simp only [mem_powerset, subset_def, mem_union, pair, mem_pair]
state_before: case intro.intro.intro.intro.intro
p : ZFSet → ZFSet → Prop
x y a : ZFSet
ax : a ∈ x
b : ZFSet
bY : b ∈ y
pab : p a b
⊢ a.pair b ∈ (x ∪ y).powerset.powerset
state_after: case intro.intro.intro.intro.intro
p : ZFSet → ZFSet → Prop
x y a : ZFSet
ax : a ∈ x
b : ZFSet
bY : b ∈ y
pab : p a b
⊢ ∀ ⦃z : ZFSet⦄, z = {a} ∨ z = {a, b} → ∀ ⦃z_1 : ZFSet⦄, z_1 ∈ z → z_1 ∈ x ∨ z_1 ∈ y

tactic: rintro u (rfl | rfl) v <;> simp only [mem_singleton, mem_pair]
state_before: case intro.intro.intro.intro.intro
p : ZFSet → ZFSet → Prop
x y a : ZFSet
ax : a ∈ x
b : ZFSet
bY : b ∈ y
pab : p a b
⊢ ∀ ⦃z : ZFSet⦄, z = {a} ∨ z = {a, b} → ∀ ⦃z_1 : ZFSet⦄, z_1 ∈ z → z_1 ∈ x ∨ z_1 ∈ y
state_after: case intro.intro.intro.intro.intro.inl
p : ZFSet → ZFSet → Prop
x y a : ZFSet
ax : a ∈ x
b : ZFSet
bY : b ∈ y
pab : p a b
v : ZFSet
⊢ v = a → v ∈ x ∨ v ∈ y

case intro.intro.intro.intro.intro.inr
p : ZFSet → ZFSet → Prop
x y a : ZFSet
ax : a ∈ x
b : ZFSet
bY : b ∈ y
pab : p a b
v : ZFSet
⊢ v = a ∨ v = b → v ∈ x ∨ v ∈ y

tactic: rintro rfl
state_before: case intro.intro.intro.intro.intro.inl
p : ZFSet → ZFSet → Prop
x y a : ZFSet
ax : a ∈ x
b : ZFSet
bY : b ∈ y
pab : p a b
v : ZFSet
⊢ v = a → v ∈ x ∨ v ∈ y
state_after: case intro.intro.intro.intro.intro.inl
p : ZFSet → ZFSet → Prop
x y b : ZFSet
bY : b ∈ y
v : ZFSet
ax : v ∈ x
pab : p v b
⊢ v ∈ x ∨ v ∈ y

tactic: exact Or.inl ax
state_before: case intro.intro.intro.intro.intro.inl
p : ZFSet → ZFSet → Prop
x y b : ZFSet
bY : b ∈ y
v : ZFSet
ax : v ∈ x
pab : p v b
⊢ v ∈ x ∨ v ∈ y
state_after: no goals

tactic: rintro (rfl | rfl) <;> [left; right] <;> assumption
state_before: case intro.intro.intro.intro.intro.inr
p : ZFSet → ZFSet → Prop
x y a : ZFSet
ax : a ∈ x
b : ZFSet
bY : b ∈ y
pab : p a b
v : ZFSet
⊢ v = a ∨ v = b → v ∈ x ∨ v ∈ y
state_after: no goals
Theorem: algebraMap_injective
File: Mathlib/NumberTheory/FunctionField.lean

tactic: rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
state_before: Fq F : Type
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
⊢ Function.Injective ⇑(algebraMap Fq[X] F)
state_after: Fq F : Type
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
⊢ Function.Injective ⇑((algebraMap (RatFunc Fq) F).comp (algebraMap Fq[X] (RatFunc Fq)))

tactic: exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
state_before: Fq F : Type
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
⊢ Function.Injective ⇑((algebraMap (RatFunc Fq) F).comp (algebraMap Fq[X] (RatFunc Fq)))
state_after: no goals
Theorem: spectrum.add_mem_iff
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: simp only [mem_iff, sub_neg_eq_add, ← sub_sub, map_add]
state_before: R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r s : R
⊢ r + s ∈ σ a ↔ r ∈ σ (-↑ₐ s + a)
state_after: no goals
Theorem: HomogeneousIdeal.toIdeal_homogeneousCore_eq_self
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean

tactic: ext1
state_before: ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I✝ : Ideal A
I : HomogeneousIdeal 𝒜
⊢ Ideal.homogeneousCore 𝒜 I.toIdeal = I
state_after: case h
ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I✝ : Ideal A
I : HomogeneousIdeal 𝒜
⊢ (Ideal.homogeneousCore 𝒜 I.toIdeal).toIdeal = I.toIdeal

tactic: convert Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self I.isHomogeneous
state_before: case h
ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I✝ : Ideal A
I : HomogeneousIdeal 𝒜
⊢ (Ideal.homogeneousCore 𝒜 I.toIdeal).toIdeal = I.toIdeal
state_after: no goals
Theorem: Subgroup.subgroupOf_eq_top
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

tactic: rw [← top_subgroupOf, subgroupOf_inj, top_inf_eq, inf_eq_right]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
H✝ K✝ : Subgroup G
k : Set G
N : Type u_5
inst✝¹ : Group N
P : Type u_6
inst✝ : Group P
H K : Subgroup G
⊢ H.subgroupOf K = ⊤ ↔ K ≤ H
state_after: no goals
Theorem: Num.toZNum_inj
File: Mathlib/Data/Num/Lemmas.lean

tactic: cases m <;> cases n <;> cases h <;> rfl
state_before: α : Type u_1
m n : Num
h : m.toZNum = n.toZNum
⊢ m = n
state_after: no goals
Theorem: Asymptotics.isTheta_const_const_iff
File: Mathlib/Analysis/Asymptotics/Theta.lean

tactic: simpa only [IsTheta, isBigO_const_const_iff, ← iff_def] using Iff.comm
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
R : Type u_12
R' : Type u_13
𝕜 : Type u_14
𝕜' : Type u_15
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedRing R'
inst✝² : NormedField 𝕜
inst✝¹ : NormedField 𝕜'
c c' c₁✝ c₂✝ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
l l' : Filter α
inst✝ : l.NeBot
c₁ : E''
c₂ : F''
⊢ ((fun x => c₁) =Θ[l] fun x => c₂) ↔ (c₁ = 0 ↔ c₂ = 0)
state_after: no goals
Theorem: EMetric.preimage_mul_right_ball
File: Mathlib/Topology/MetricSpace/IsometricSMul.lean

tactic: rw [div_eq_mul_inv]
state_before: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoEMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoEMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ≥0∞
⊢ (fun x => x * a) ⁻¹' ball b r = ball (b / a) r
state_after: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoEMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoEMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ≥0∞
⊢ (fun x => x * a) ⁻¹' ball b r = ball (b * a⁻¹) r

tactic: exact preimage_smul_ball (MulOpposite.op a) b r
state_before: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoEMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoEMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ≥0∞
⊢ (fun x => x * a) ⁻¹' ball b r = ball (b * a⁻¹) r
state_after: no goals
Theorem: Polynomial.eq_zero_of_dvd_of_degree_lt
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: by_contra hc
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h₁ : p ∣ q
h₂ : q.degree < p.degree
⊢ q = 0
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h₁ : p ∣ q
h₂ : q.degree < p.degree
hc : ¬q = 0
⊢ False

tactic: exact (lt_iff_not_ge _ _).mp h₂ (degree_le_of_dvd h₁ hc)
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h₁ : p ∣ q
h₂ : q.degree < p.degree
hc : ¬q = 0
⊢ False
state_after: no goals
Theorem: Mathlib.Meta.NormNum.isNat_rpow_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rwa [pb.out, rpow_natCast]
state_before: a b : ℝ
nb ne : ℕ
pb : IsNat b nb
pe' : IsNat (a ^ nb) ne
⊢ IsNat (a ^ b) ne
state_after: no goals
Theorem: LinearMap.re_inner_adjoint_mul_self_nonneg
File: Mathlib/Analysis/InnerProductSpace/Adjoint.lean

tactic: simp only [mul_apply, adjoint_inner_right, inner_self_eq_norm_sq_to_K]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁹ : RCLike 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : FiniteDimensional 𝕜 E
inst✝¹ : FiniteDimensional 𝕜 F
inst✝ : FiniteDimensional 𝕜 G
T : E →ₗ[𝕜] E
x : E
⊢ 0 ≤ re ⟪x, (adjoint T * T) x⟫_𝕜
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁹ : RCLike 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : FiniteDimensional 𝕜 E
inst✝¹ : FiniteDimensional 𝕜 F
inst✝ : FiniteDimensional 𝕜 G
T : E →ₗ[𝕜] E
x : E
⊢ 0 ≤ re (↑‖T x‖ ^ 2)

tactic: norm_cast
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁹ : RCLike 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : FiniteDimensional 𝕜 E
inst✝¹ : FiniteDimensional 𝕜 F
inst✝ : FiniteDimensional 𝕜 G
T : E →ₗ[𝕜] E
x : E
⊢ 0 ≤ re (↑‖T x‖ ^ 2)
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁹ : RCLike 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : FiniteDimensional 𝕜 E
inst✝¹ : FiniteDimensional 𝕜 F
inst✝ : FiniteDimensional 𝕜 G
T : E →ₗ[𝕜] E
x : E
⊢ 0 ≤ ‖T x‖ ^ 2

tactic: exact sq_nonneg _
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁹ : RCLike 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : FiniteDimensional 𝕜 E
inst✝¹ : FiniteDimensional 𝕜 F
inst✝ : FiniteDimensional 𝕜 G
T : E →ₗ[𝕜] E
x : E
⊢ 0 ≤ ‖T x‖ ^ 2
state_after: no goals
Theorem: Orientation.cos_oangle_eq_inner_div_norm_mul_norm
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

tactic: rw [o.inner_eq_norm_mul_norm_mul_cos_oangle]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ (o.oangle x y).cos = ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖)
state_after: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ (o.oangle x y).cos = ‖x‖ * ‖y‖ * (o.oangle x y).cos / (‖x‖ * ‖y‖)

tactic: field_simp [norm_ne_zero_iff.2 hx, norm_ne_zero_iff.2 hy]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ (o.oangle x y).cos = ‖x‖ * ‖y‖ * (o.oangle x y).cos / (‖x‖ * ‖y‖)
state_after: no goals
Theorem: CategoryTheory.ShortComplex.i_cyclesMk
File: Mathlib/Algebra/Homology/ShortComplex/ConcreteCategory.lean

tactic: dsimp [cyclesMk]
state_before: C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : ConcreteCategory C
inst✝⁵ : HasForget₂ C Ab
inst✝⁴ : Preadditive C
inst✝³ : (forget₂ C Ab).Additive
inst✝² : (forget₂ C Ab).PreservesHomology
inst✝¹ : HasZeroObject C
S : ShortComplex C
inst✝ : S.HasHomology
x₂ : ↑((forget₂ C Ab).obj S.X₂)
hx₂ : ((forget₂ C Ab).map S.g) x₂ = 0
⊢ ((forget₂ C Ab).map S.iCycles) (S.cyclesMk x₂ hx₂) = x₂
state_after: C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : ConcreteCategory C
inst✝⁵ : HasForget₂ C Ab
inst✝⁴ : Preadditive C
inst✝³ : (forget₂ C Ab).Additive
inst✝² : (forget₂ C Ab).PreservesHomology
inst✝¹ : HasZeroObject C
S : ShortComplex C
inst✝ : S.HasHomology
x₂ : ↑((forget₂ C Ab).obj S.X₂)
hx₂ : ((forget₂ C Ab).map S.g) x₂ = 0
⊢ ((forget₂ C Ab).map S.iCycles)
      ((S.mapCyclesIso (forget₂ C Ab)).hom ((S.map (forget₂ C Ab)).abCyclesIso.inv ⟨x₂, hx₂⟩)) =
    x₂

tactic: erw [← comp_apply, S.mapCyclesIso_hom_iCycles (forget₂ C Ab),
  ← comp_apply, abCyclesIso_inv_apply_iCycles ]
state_before: C : Type u
inst✝⁷ : Category.{v, u} C
inst✝⁶ : ConcreteCategory C
inst✝⁵ : HasForget₂ C Ab
inst✝⁴ : Preadditive C
inst✝³ : (forget₂ C Ab).Additive
inst✝² : (forget₂ C Ab).PreservesHomology
inst✝¹ : HasZeroObject C
S : ShortComplex C
inst✝ : S.HasHomology
x₂ : ↑((forget₂ C Ab).obj S.X₂)
hx₂ : ((forget₂ C Ab).map S.g) x₂ = 0
⊢ ((forget₂ C Ab).map S.iCycles)
      ((S.mapCyclesIso (forget₂ C Ab)).hom ((S.map (forget₂ C Ab)).abCyclesIso.inv ⟨x₂, hx₂⟩)) =
    x₂
state_after: no goals
Theorem: interior_sphere
File: Mathlib/Analysis/NormedSpace/Real.lean

tactic: rw [← frontier_closedBall x hr, interior_frontier isClosed_ball]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
hr : r ≠ 0
⊢ interior (sphere x r) = ∅
state_after: no goals
Theorem: CategoryTheory.MonoidalFunctor.map_whiskerRight
File: Mathlib/CategoryTheory/Monoidal/Functor.lean

tactic: simp
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F : MonoidalFunctor C D
X Y : C
f : X ⟶ Y
Z : C
⊢ F.map (f ▷ Z) = inv (F.μ X Z) ≫ F.map f ▷ F.obj Z ≫ F.μ Y Z
state_after: no goals
Theorem: CliffordAlgebra.iSup_ι_range_eq_top
File: Mathlib/LinearAlgebra/CliffordAlgebra/Grading.lean

tactic: rw [← (DirectSum.Decomposition.isInternal (evenOdd Q)).submodule_iSup_eq_top, eq_comm]
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ ⨆ i, LinearMap.range (ι Q) ^ i = ⊤
state_after: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ iSup (evenOdd Q) = ⨆ i, LinearMap.range (ι Q) ^ i

tactic: calc
  ⨆ (i : ZMod 2) (j : { n : ℕ // ↑n = i }), LinearMap.range (ι Q) ^ (j : ℕ) =
      ⨆ i : Σ i : ZMod 2, { n : ℕ // ↑n = i }, LinearMap.range (ι Q) ^ (i.2 : ℕ) := by
    rw [iSup_sigma]
  _ = ⨆ i : ℕ, LinearMap.range (ι Q) ^ i :=
    Function.Surjective.iSup_congr (fun i => i.2) (fun i => ⟨⟨_, i, rfl⟩, rfl⟩) fun _ => rfl
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ iSup (evenOdd Q) = ⨆ i, LinearMap.range (ι Q) ^ i
state_after: no goals

tactic: rw [iSup_sigma]
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ ⨆ i, ⨆ j, LinearMap.range (ι Q) ^ ↑j = ⨆ i, LinearMap.range (ι Q) ^ ↑i.snd
state_after: no goals
Theorem: Set.image_injective
File: Mathlib/Data/Set/Image.lean

tactic: refine ⟨fun h x x' hx => ?_, Injective.image_injective⟩
state_before: α : Type u
β : Type v
f : α → β
⊢ Injective (image f) ↔ Injective f
state_after: α : Type u
β : Type v
f : α → β
h : Injective (image f)
x x' : α
hx : f x = f x'
⊢ x = x'

tactic: rw [← singleton_eq_singleton_iff]
state_before: α : Type u
β : Type v
f : α → β
h : Injective (image f)
x x' : α
hx : f x = f x'
⊢ x = x'
state_after: α : Type u
β : Type v
f : α → β
h : Injective (image f)
x x' : α
hx : f x = f x'
⊢ {x} = {x'}

tactic: apply h
state_before: α : Type u
β : Type v
f : α → β
h : Injective (image f)
x x' : α
hx : f x = f x'
⊢ {x} = {x'}
state_after: case a
α : Type u
β : Type v
f : α → β
h : Injective (image f)
x x' : α
hx : f x = f x'
⊢ f '' {x} = f '' {x'}

tactic: rw [image_singleton, image_singleton, hx]
state_before: case a
α : Type u
β : Type v
f : α → β
h : Injective (image f)
x x' : α
hx : f x = f x'
⊢ f '' {x} = f '' {x'}
state_after: no goals
Theorem: MonoidHom.CompTriple.comp_assoc
File: Mathlib/Algebra/Group/Hom/CompTypeclasses.lean

tactic: rintro ⟨h⟩
state_before: case mpr
M' : Type u_1
inst✝⁴ : Monoid M'
M : Type u_2
N : Type u_3
P : Type u_4
inst✝³ : Monoid M
inst✝² : Monoid N
inst✝¹ : Monoid P
Q : Type u_5
inst✝ : Monoid Q
φ₁ : M →* N
φ₂ : N →* P
φ₁₂ : M →* P
κ : φ₁.CompTriple φ₂ φ₁₂
φ₃ : P →* Q
φ₂₃ : N →* Q
κ' : φ₂.CompTriple φ₃ φ₂₃
φ₁₂₃ : M →* Q
⊢ φ₁₂.CompTriple φ₃ φ₁₂₃ → φ₁.CompTriple φ₂₃ φ₁₂₃
state_after: case mpr.mk
M' : Type u_1
inst✝⁴ : Monoid M'
M : Type u_2
N : Type u_3
P : Type u_4
inst✝³ : Monoid M
inst✝² : Monoid N
inst✝¹ : Monoid P
Q : Type u_5
inst✝ : Monoid Q
φ₁ : M →* N
φ₂ : N →* P
φ₁₂ : M →* P
κ : φ₁.CompTriple φ₂ φ₁₂
φ₃ : P →* Q
φ₂₃ : N →* Q
κ' : φ₂.CompTriple φ₃ φ₂₃
φ₁₂₃ : M →* Q
h : φ₃.comp φ₁₂ = φ₁₂₃
⊢ φ₁.CompTriple φ₂₃ φ₁₂₃

tactic: exact ⟨by simp only [← κ.comp_eq, ← h, ← κ'.comp_eq, MonoidHom.comp_assoc]⟩
state_before: case mpr.mk
M' : Type u_1
inst✝⁴ : Monoid M'
M : Type u_2
N : Type u_3
P : Type u_4
inst✝³ : Monoid M
inst✝² : Monoid N
inst✝¹ : Monoid P
Q : Type u_5
inst✝ : Monoid Q
φ₁ : M →* N
φ₂ : N →* P
φ₁₂ : M →* P
κ : φ₁.CompTriple φ₂ φ₁₂
φ₃ : P →* Q
φ₂₃ : N →* Q
κ' : φ₂.CompTriple φ₃ φ₂₃
φ₁₂₃ : M →* Q
h : φ₃.comp φ₁₂ = φ₁₂₃
⊢ φ₁.CompTriple φ₂₃ φ₁₂₃
state_after: no goals

tactic: simp only [← κ.comp_eq, ← h, ← κ'.comp_eq, MonoidHom.comp_assoc]
state_before: M' : Type u_1
inst✝⁴ : Monoid M'
M : Type u_2
N : Type u_3
P : Type u_4
inst✝³ : Monoid M
inst✝² : Monoid N
inst✝¹ : Monoid P
Q : Type u_5
inst✝ : Monoid Q
φ₁ : M →* N
φ₂ : N →* P
φ₁₂ : M →* P
κ : φ₁.CompTriple φ₂ φ₁₂
φ₃ : P →* Q
φ₂₃ : N →* Q
κ' : φ₂.CompTriple φ₃ φ₂₃
φ₁₂₃ : M →* Q
h : φ₃.comp φ₁₂ = φ₁₂₃
⊢ φ₂₃.comp φ₁ = φ₁₂₃
state_after: no goals
Theorem: AddChar.compAddMonoidHom_injective_right
File: Mathlib/Algebra/Group/AddChar.lean

tactic: rintro f g h
state_before: A : Type u_1
B : Type u_2
M : Type u_3
N : Type u_4
inst✝³ : AddMonoid A
inst✝² : AddMonoid B
inst✝¹ : Monoid M
inst✝ : Monoid N
ψ✝ : AddChar A M
ψ : AddChar B M
hψ : Injective ⇑ψ
⊢ Injective fun f => ψ.compAddMonoidHom f
state_after: A : Type u_1
B : Type u_2
M : Type u_3
N : Type u_4
inst✝³ : AddMonoid A
inst✝² : AddMonoid B
inst✝¹ : Monoid M
inst✝ : Monoid N
ψ✝ : AddChar A M
ψ : AddChar B M
hψ : Injective ⇑ψ
f g : A →+ B
h : (fun f => ψ.compAddMonoidHom f) f = (fun f => ψ.compAddMonoidHom f) g
⊢ f = g

tactic: rw [DFunLike.ext'_iff] at h ⊢
state_before: A : Type u_1
B : Type u_2
M : Type u_3
N : Type u_4
inst✝³ : AddMonoid A
inst✝² : AddMonoid B
inst✝¹ : Monoid M
inst✝ : Monoid N
ψ✝ : AddChar A M
ψ : AddChar B M
hψ : Injective ⇑ψ
f g : A →+ B
h : (fun f => ψ.compAddMonoidHom f) f = (fun f => ψ.compAddMonoidHom f) g
⊢ f = g
state_after: A : Type u_1
B : Type u_2
M : Type u_3
N : Type u_4
inst✝³ : AddMonoid A
inst✝² : AddMonoid B
inst✝¹ : Monoid M
inst✝ : Monoid N
ψ✝ : AddChar A M
ψ : AddChar B M
hψ : Injective ⇑ψ
f g : A →+ B
h : ⇑((fun f => ψ.compAddMonoidHom f) f) = ⇑((fun f => ψ.compAddMonoidHom f) g)
⊢ ⇑f = ⇑g

tactic: exact hψ.comp_left h
state_before: A : Type u_1
B : Type u_2
M : Type u_3
N : Type u_4
inst✝³ : AddMonoid A
inst✝² : AddMonoid B
inst✝¹ : Monoid M
inst✝ : Monoid N
ψ✝ : AddChar A M
ψ : AddChar B M
hψ : Injective ⇑ψ
f g : A →+ B
h : ⇑((fun f => ψ.compAddMonoidHom f) f) = ⇑((fun f => ψ.compAddMonoidHom f) g)
⊢ ⇑f = ⇑g
state_after: no goals
Theorem: ProbabilityTheory.cgf_zero'
File: Mathlib/Probability/Moments.lean

tactic: simp only [cgf, mgf_zero']
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ cgf X μ 0 = log (μ Set.univ).toReal
state_after: no goals