1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Complex.abs_le_sqrt_two_mul_max
File: Mathlib/Data/Complex/Abs.lean

tactic: cases' z with x y
state_before: z : ℂ
⊢ abs z ≤ √2 * max |z.re| |z.im|
state_after: case mk
x y : ℝ
⊢ abs { re := x, im := y } ≤ √2 * max |{ re := x, im := y }.re| |{ re := x, im := y }.im|

tactic: simp only [abs_apply, normSq_mk, ← sq]
state_before: case mk
x y : ℝ
⊢ abs { re := x, im := y } ≤ √2 * max |{ re := x, im := y }.re| |{ re := x, im := y }.im|
state_after: case mk
x y : ℝ
⊢ √(x ^ 2 + y ^ 2) ≤ √2 * max |x| |y|

tactic: by_cases hle : |x| ≤ |y|
state_before: case mk
x y : ℝ
⊢ √(x ^ 2 + y ^ 2) ≤ √2 * max |x| |y|
state_after: case pos
x y : ℝ
hle : |x| ≤ |y|
⊢ √(x ^ 2 + y ^ 2) ≤ √2 * max |x| |y|

case neg
x y : ℝ
hle : ¬|x| ≤ |y|
⊢ √(x ^ 2 + y ^ 2) ≤ √2 * max |x| |y|

tactic: calc
  Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt (y ^ 2 + y ^ 2) :=
    Real.sqrt_le_sqrt (add_le_add_right (sq_le_sq.2 hle) _)
  _ = Real.sqrt 2 * max |x| |y| := by
    rw [max_eq_right hle, ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
state_before: case pos
x y : ℝ
hle : |x| ≤ |y|
⊢ √(x ^ 2 + y ^ 2) ≤ √2 * max |x| |y|
state_after: no goals

tactic: rw [max_eq_right hle, ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
state_before: x y : ℝ
hle : |x| ≤ |y|
⊢ √(y ^ 2 + y ^ 2) = √2 * max |x| |y|
state_after: no goals

tactic: have hle' := le_of_not_le hle
state_before: case neg
x y : ℝ
hle : ¬|x| ≤ |y|
⊢ √(x ^ 2 + y ^ 2) ≤ √2 * max |x| |y|
state_after: case neg
x y : ℝ
hle : ¬|x| ≤ |y|
hle' : |y| ≤ |x|
⊢ √(x ^ 2 + y ^ 2) ≤ √2 * max |x| |y|

tactic: rw [add_comm]
state_before: case neg
x y : ℝ
hle : ¬|x| ≤ |y|
hle' : |y| ≤ |x|
⊢ √(x ^ 2 + y ^ 2) ≤ √2 * max |x| |y|
state_after: case neg
x y : ℝ
hle : ¬|x| ≤ |y|
hle' : |y| ≤ |x|
⊢ √(y ^ 2 + x ^ 2) ≤ √2 * max |x| |y|

tactic: calc
  Real.sqrt (y ^ 2 + x ^ 2) ≤ Real.sqrt (x ^ 2 + x ^ 2) :=
    Real.sqrt_le_sqrt (add_le_add_right (sq_le_sq.2 hle') _)
  _ = Real.sqrt 2 * max |x| |y| := by
    rw [max_eq_left hle', ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
state_before: case neg
x y : ℝ
hle : ¬|x| ≤ |y|
hle' : |y| ≤ |x|
⊢ √(y ^ 2 + x ^ 2) ≤ √2 * max |x| |y|
state_after: no goals

tactic: rw [max_eq_left hle', ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
state_before: x y : ℝ
hle : ¬|x| ≤ |y|
hle' : |y| ≤ |x|
⊢ √(x ^ 2 + x ^ 2) = √2 * max |x| |y|
state_after: no goals
Theorem: CategoryTheory.IsPushout.IsVanKampen.isPullback_of_mono_left
File: Mathlib/CategoryTheory/Adhesive.lean

tactic: simp
state_before: J : Type v'
inst✝² : Category.{u', v'} J
C : Type u
inst✝¹ : Category.{v, u} C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : H.IsVanKampen
⊢ g ≫ 𝟙 Y = 𝟙 W ≫ g
state_after: no goals

tactic: simp
state_before: J : Type v'
inst✝² : Category.{u', v'} J
C : Type u
inst✝¹ : Category.{v, u} C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : H.IsVanKampen
⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y
state_after: no goals
Theorem: TorusIntegrable.torusIntegrable_const
File: Mathlib/MeasureTheory/Integral/TorusIntegral.lean

tactic: simp [TorusIntegrable, measure_Icc_lt_top]
state_before: n : ℕ
E : Type u_1
inst✝ : NormedAddCommGroup E
f g : (Fin n → ℂ) → E
c✝ : Fin n → ℂ
R✝ : Fin n → ℝ
a : E
c : Fin n → ℂ
R : Fin n → ℝ
⊢ TorusIntegrable (fun x => a) c R
state_after: no goals
Theorem: DomMulAct.mem_stabilizer_iff
File: Mathlib/GroupTheory/Perm/DomMulAct.lean

tactic: simp only [MulAction.mem_stabilizer_iff]
state_before: α : Type u_1
ι : Type u_2
f : α → ι
g : (Perm α)ᵈᵐᵃ
⊢ g ∈ stabilizer (Perm α)ᵈᵐᵃ f ↔ f ∘ ⇑(mk.symm g) = f
state_after: α : Type u_1
ι : Type u_2
f : α → ι
g : (Perm α)ᵈᵐᵃ
⊢ g • f = f ↔ f ∘ ⇑(mk.symm g) = f

tactic: rfl
state_before: α : Type u_1
ι : Type u_2
f : α → ι
g : (Perm α)ᵈᵐᵃ
⊢ g • f = f ↔ f ∘ ⇑(mk.symm g) = f
state_after: no goals
Theorem: Polynomial.X_dvd_iff
File: Mathlib/Algebra/Polynomial/Div.lean

tactic: rw [hfg, coeff_X_mul_zero]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f : R[X]
x✝ : X ∣ f
g : R[X]
hfg : f = X * g
⊢ f.coeff 0 = 0
state_after: no goals

tactic: rw [← add_zero (X * f.divX), ← C_0, ← hf, X_mul_divX_add]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f : R[X]
hf : f.coeff 0 = 0
⊢ f = X * f.divX
state_after: no goals
Theorem: TensorProduct.map_add_left
File: Mathlib/LinearAlgebra/TensorProduct/Basic.lean

tactic: ext
state_before: R : Type u_1
inst✝²⁰ : CommSemiring R
R' : Type u_2
inst✝¹⁹ : Monoid R'
R'' : Type u_3
inst✝¹⁸ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹⁷ : AddCommMonoid M
inst✝¹⁶ : AddCommMonoid N
inst✝¹⁵ : AddCommMonoid P
inst✝¹⁴ : AddCommMonoid Q
inst✝¹³ : AddCommMonoid S
inst✝¹² : AddCommMonoid T
inst✝¹¹ : Module R M
inst✝¹⁰ : Module R N
inst✝⁹ : Module R P
inst✝⁸ : Module R Q
inst✝⁷ : Module R S
inst✝⁶ : Module R T
inst✝⁵ : DistribMulAction R' M
inst✝⁴ : Module R'' M
P' : Type u_10
Q' : Type u_11
inst✝³ : AddCommMonoid P'
inst✝² : Module R P'
inst✝¹ : AddCommMonoid Q'
inst✝ : Module R Q'
f₁ f₂ : M →ₗ[R] P
g : N →ₗ[R] Q
⊢ map (f₁ + f₂) g = map f₁ g + map f₂ g
state_after: case H.h.h
R : Type u_1
inst✝²⁰ : CommSemiring R
R' : Type u_2
inst✝¹⁹ : Monoid R'
R'' : Type u_3
inst✝¹⁸ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹⁷ : AddCommMonoid M
inst✝¹⁶ : AddCommMonoid N
inst✝¹⁵ : AddCommMonoid P
inst✝¹⁴ : AddCommMonoid Q
inst✝¹³ : AddCommMonoid S
inst✝¹² : AddCommMonoid T
inst✝¹¹ : Module R M
inst✝¹⁰ : Module R N
inst✝⁹ : Module R P
inst✝⁸ : Module R Q
inst✝⁷ : Module R S
inst✝⁶ : Module R T
inst✝⁵ : DistribMulAction R' M
inst✝⁴ : Module R'' M
P' : Type u_10
Q' : Type u_11
inst✝³ : AddCommMonoid P'
inst✝² : Module R P'
inst✝¹ : AddCommMonoid Q'
inst✝ : Module R Q'
f₁ f₂ : M →ₗ[R] P
g : N →ₗ[R] Q
x✝¹ : M
x✝ : N
⊢ (((mk R M N).compr₂ (map (f₁ + f₂) g)) x✝¹) x✝ = (((mk R M N).compr₂ (map f₁ g + map f₂ g)) x✝¹) x✝

tactic: simp only [add_tmul, compr₂_apply, mk_apply, map_tmul, add_apply]
state_before: case H.h.h
R : Type u_1
inst✝²⁰ : CommSemiring R
R' : Type u_2
inst✝¹⁹ : Monoid R'
R'' : Type u_3
inst✝¹⁸ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹⁷ : AddCommMonoid M
inst✝¹⁶ : AddCommMonoid N
inst✝¹⁵ : AddCommMonoid P
inst✝¹⁴ : AddCommMonoid Q
inst✝¹³ : AddCommMonoid S
inst✝¹² : AddCommMonoid T
inst✝¹¹ : Module R M
inst✝¹⁰ : Module R N
inst✝⁹ : Module R P
inst✝⁸ : Module R Q
inst✝⁷ : Module R S
inst✝⁶ : Module R T
inst✝⁵ : DistribMulAction R' M
inst✝⁴ : Module R'' M
P' : Type u_10
Q' : Type u_11
inst✝³ : AddCommMonoid P'
inst✝² : Module R P'
inst✝¹ : AddCommMonoid Q'
inst✝ : Module R Q'
f₁ f₂ : M →ₗ[R] P
g : N →ₗ[R] Q
x✝¹ : M
x✝ : N
⊢ (((mk R M N).compr₂ (map (f₁ + f₂) g)) x✝¹) x✝ = (((mk R M N).compr₂ (map f₁ g + map f₂ g)) x✝¹) x✝
state_after: no goals
Theorem: SemiconjBy.add_right
File: Mathlib/Algebra/Ring/Semiconj.lean

tactic: simp only [SemiconjBy, left_distrib, right_distrib, h.eq, h'.eq]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : Distrib R
a x y x' y' : R
h : SemiconjBy a x y
h' : SemiconjBy a x' y'
⊢ SemiconjBy a (x + x') (y + y')
state_after: no goals
Theorem: Polynomial.expand_aeval
File: Mathlib/Algebra/Polynomial/Expand.lean

tactic: refine Polynomial.induction_on P (fun a => by simp) (fun f g hf hg => ?_) fun n a _ => by simp
state_before: R : Type u
inst✝³ : CommSemiring R
S : Type v
inst✝² : CommSemiring S
p✝ q : ℕ
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : ℕ
P : R[X]
r : A
⊢ (aeval r) ((expand R p) P) = (aeval (r ^ p)) P
state_after: R : Type u
inst✝³ : CommSemiring R
S : Type v
inst✝² : CommSemiring S
p✝ q : ℕ
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : ℕ
P : R[X]
r : A
f g : R[X]
hf : (aeval r) ((expand R p) f) = (aeval (r ^ p)) f
hg : (aeval r) ((expand R p) g) = (aeval (r ^ p)) g
⊢ (aeval r) ((expand R p) (f + g)) = (aeval (r ^ p)) (f + g)

tactic: rw [AlgHom.map_add, aeval_add, aeval_add, hf, hg]
state_before: R : Type u
inst✝³ : CommSemiring R
S : Type v
inst✝² : CommSemiring S
p✝ q : ℕ
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : ℕ
P : R[X]
r : A
f g : R[X]
hf : (aeval r) ((expand R p) f) = (aeval (r ^ p)) f
hg : (aeval r) ((expand R p) g) = (aeval (r ^ p)) g
⊢ (aeval r) ((expand R p) (f + g)) = (aeval (r ^ p)) (f + g)
state_after: no goals

tactic: simp
state_before: R : Type u
inst✝³ : CommSemiring R
S : Type v
inst✝² : CommSemiring S
p✝ q : ℕ
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : ℕ
P : R[X]
r : A
a : R
⊢ (aeval r) ((expand R p) (C a)) = (aeval (r ^ p)) (C a)
state_after: no goals

tactic: simp
state_before: R : Type u
inst✝³ : CommSemiring R
S : Type v
inst✝² : CommSemiring S
p✝ q : ℕ
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : ℕ
P : R[X]
r : A
n : ℕ
a : R
x✝ : (aeval r) ((expand R p) (C a * X ^ n)) = (aeval (r ^ p)) (C a * X ^ n)
⊢ (aeval r) ((expand R p) (C a * X ^ (n + 1))) = (aeval (r ^ p)) (C a * X ^ (n + 1))
state_after: no goals
Theorem: IsLocalDiffeomorphAt.contMDiffAt
File: Mathlib/Geometry/Manifold/LocalDiffeomorph.lean

tactic: choose Φ hx heq using hf
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
H : Type u_4
inst✝⁵ : TopologicalSpace H
G : Type u_5
inst✝⁴ : TopologicalSpace G
I : ModelWithCorners 𝕜 E H
J : ModelWithCorners 𝕜 F G
M : Type u_6
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
N : Type u_7
inst✝¹ : TopologicalSpace N
inst✝ : ChartedSpace G N
n : ℕ∞
f : M → N
s : Set M
x : M
hf : IsLocalDiffeomorphAt I J n f x
⊢ ContMDiffAt I J n f x
state_after: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
H : Type u_4
inst✝⁵ : TopologicalSpace H
G : Type u_5
inst✝⁴ : TopologicalSpace G
I : ModelWithCorners 𝕜 E H
J : ModelWithCorners 𝕜 F G
M : Type u_6
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
N : Type u_7
inst✝¹ : TopologicalSpace N
inst✝ : ChartedSpace G N
n : ℕ∞
f : M → N
s : Set M
x : M
Φ : PartialDiffeomorph I J M N n
hx : x ∈ Φ.source
heq : EqOn f (↑Φ.toPartialEquiv) Φ.source
⊢ ContMDiffAt I J n f x

tactic: exact ((Φ.contMDiffOn_toFun).congr heq).contMDiffAt (Φ.open_source.mem_nhds hx)
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
H : Type u_4
inst✝⁵ : TopologicalSpace H
G : Type u_5
inst✝⁴ : TopologicalSpace G
I : ModelWithCorners 𝕜 E H
J : ModelWithCorners 𝕜 F G
M : Type u_6
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
N : Type u_7
inst✝¹ : TopologicalSpace N
inst✝ : ChartedSpace G N
n : ℕ∞
f : M → N
s : Set M
x : M
Φ : PartialDiffeomorph I J M N n
hx : x ∈ Φ.source
heq : EqOn f (↑Φ.toPartialEquiv) Φ.source
⊢ ContMDiffAt I J n f x
state_after: no goals
Theorem: Set.ncard_preimage_of_injective_subset_range
File: Mathlib/Data/Set/Card.lean

tactic: rw [← ncard_image_of_injective _ H, image_preimage_eq_iff.mpr hs]
state_before: α : Type u_1
β : Type u_2
s✝ t : Set α
f : α → β
s : Set β
H : Function.Injective f
hs : s ⊆ range f
⊢ (f ⁻¹' s).ncard = s.ncard
state_after: no goals
Theorem: multipliable_iff_nat_tprod_vanishing
File: Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean

tactic: rw [multipliable_iff_cauchySeq_finset, cauchySeq_finset_iff_nat_tprod_vanishing]
state_before: M : Type u_1
inst✝⁵ : CommMonoid M
inst✝⁴ : TopologicalSpace M
m m' : M
G : Type u_2
inst✝³ : CommGroup G
g g' : G
inst✝² : UniformSpace G
inst✝¹ : UniformGroup G
inst✝ : CompleteSpace G
f : ℕ → G
⊢ Multipliable f ↔ ∀ e ∈ 𝓝 1, ∃ N, ∀ t ⊆ {n | N ≤ n}, ∏' (n : ↑t), f ↑n ∈ e
state_after: no goals
Theorem: CategoryTheory.NonPreadditiveAbelian.lift_sub_lift
File: Mathlib/CategoryTheory/Abelian/NonPreadditive.lean

tactic: simp only [sub_def]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c d : X ⟶ Y
⊢ prod.lift a b - prod.lift c d = prod.lift (a - c) (b - d)
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c d : X ⟶ Y
⊢ prod.lift (prod.lift a b) (prod.lift c d) ≫ σ = prod.lift (prod.lift a c ≫ σ) (prod.lift b d ≫ σ)

tactic: ext
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c d : X ⟶ Y
⊢ prod.lift (prod.lift a b) (prod.lift c d) ≫ σ = prod.lift (prod.lift a c ≫ σ) (prod.lift b d ≫ σ)
state_after: case h₁
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c d : X ⟶ Y
⊢ (prod.lift (prod.lift a b) (prod.lift c d) ≫ σ) ≫ prod.fst =
    prod.lift (prod.lift a c ≫ σ) (prod.lift b d ≫ σ) ≫ prod.fst

case h₂
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c d : X ⟶ Y
⊢ (prod.lift (prod.lift a b) (prod.lift c d) ≫ σ) ≫ prod.snd =
    prod.lift (prod.lift a c ≫ σ) (prod.lift b d ≫ σ) ≫ prod.snd

tactic: rw [Category.assoc, σ_comp, prod.lift_map_assoc, prod.lift_fst, prod.lift_fst, prod.lift_fst]
state_before: case h₁
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c d : X ⟶ Y
⊢ (prod.lift (prod.lift a b) (prod.lift c d) ≫ σ) ≫ prod.fst =
    prod.lift (prod.lift a c ≫ σ) (prod.lift b d ≫ σ) ≫ prod.fst
state_after: no goals

tactic: rw [Category.assoc, σ_comp, prod.lift_map_assoc, prod.lift_snd, prod.lift_snd, prod.lift_snd]
state_before: case h₂
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b c d : X ⟶ Y
⊢ (prod.lift (prod.lift a b) (prod.lift c d) ≫ σ) ≫ prod.snd =
    prod.lift (prod.lift a c ≫ σ) (prod.lift b d ≫ σ) ≫ prod.snd
state_after: no goals
Theorem: AkraBazziRecurrence.GrowsPolynomially.eventually_atTop_ge_nat
File: Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean

tactic: obtain ⟨c, hc_mem, hc⟩ := hf.eventually_atTop_ge hb
state_before: f : ℝ → ℝ
b : ℝ
hb : b ∈ Set.Ioo 0 1
hf : GrowsPolynomially f
⊢ ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ u ∈ Set.Icc (b * ↑n) ↑n, c * f ↑n ≤ f u
state_after: case intro.intro
f : ℝ → ℝ
b : ℝ
hb : b ∈ Set.Ioo 0 1
hf : GrowsPolynomially f
c : ℝ
hc_mem : c > 0
hc : ∀ᶠ (x : ℝ) in atTop, ∀ u ∈ Set.Icc (b * x) x, c * f x ≤ f u
⊢ ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ u ∈ Set.Icc (b * ↑n) ↑n, c * f ↑n ≤ f u

tactic: exact ⟨c, hc_mem, hc.natCast_atTop⟩
state_before: case intro.intro
f : ℝ → ℝ
b : ℝ
hb : b ∈ Set.Ioo 0 1
hf : GrowsPolynomially f
c : ℝ
hc_mem : c > 0
hc : ∀ᶠ (x : ℝ) in atTop, ∀ u ∈ Set.Icc (b * x) x, c * f x ≤ f u
⊢ ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ u ∈ Set.Icc (b * ↑n) ↑n, c * f ↑n ≤ f u
state_after: no goals
Theorem: Basis.toMatrix_map_vecMul
File: Mathlib/LinearAlgebra/Matrix/Basis.lean

tactic: ext i
state_before: ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝⁵ : CommRing R₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
e : Basis ι R M
v✝ : ι' → M
i : ι
j : ι'
S : Type u_9
inst✝² : Ring S
inst✝¹ : Algebra R S
inst✝ : Fintype ι
b : Basis ι R S
v : ι' → S
⊢ ⇑b ᵥ* (b.toMatrix v).map ⇑(algebraMap R S) = v
state_after: case h
ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝⁵ : CommRing R₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
e : Basis ι R M
v✝ : ι' → M
i✝ : ι
j : ι'
S : Type u_9
inst✝² : Ring S
inst✝¹ : Algebra R S
inst✝ : Fintype ι
b : Basis ι R S
v : ι' → S
i : ι'
⊢ (⇑b ᵥ* (b.toMatrix v).map ⇑(algebraMap R S)) i = v i

tactic: simp_rw [vecMul, dotProduct, Matrix.map_apply, ← Algebra.commutes, ← Algebra.smul_def,
  sum_toMatrix_smul_self]
state_before: case h
ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝⁵ : CommRing R₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
e : Basis ι R M
v✝ : ι' → M
i✝ : ι
j : ι'
S : Type u_9
inst✝² : Ring S
inst✝¹ : Algebra R S
inst✝ : Fintype ι
b : Basis ι R S
v : ι' → S
i : ι'
⊢ (⇑b ᵥ* (b.toMatrix v).map ⇑(algebraMap R S)) i = v i
state_after: no goals
Theorem: Polynomial.le_trailingDegree_X_pow
File: Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean

tactic: simpa only [C_1, one_mul] using le_trailingDegree_C_mul_X_pow n (1 : R)
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
⊢ ↑n ≤ (X ^ n).trailingDegree
state_after: no goals
Theorem: MeasureTheory.exists_pos_preimage_ball
File: Mathlib/MeasureTheory/Measure/Typeclasses.lean

tactic: rw [← preimage_iUnion, Metric.iUnion_ball_nat, preimage_univ]
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : PseudoMetricSpace δ
f : α → δ
x : δ
hμ : μ ≠ 0
⊢ ⋃ i, f ⁻¹' Metric.ball x ↑i = univ
state_after: no goals
Theorem: Rat.den_mk
File: Mathlib/Data/Rat/Lemmas.lean

tactic: have (m : ℕ) : Int.natAbs (m + 1) = m + 1 := by
  rw [← Nat.cast_one, ← Nat.cast_add, Int.natAbs_cast]
state_before: n d : ℤ
⊢ (n /. d).den = if d = 0 then 1 else d.natAbs / n.gcd d
state_after: n d : ℤ
this : ∀ (m : ℕ), (↑m + 1).natAbs = m + 1
⊢ (n /. d).den = if d = 0 then 1 else d.natAbs / n.gcd d

tactic: rcases d with ((_ | _) | _) <;>
  simp [divInt, mkRat, Rat.normalize, Nat.succPNat, Int.sign, Int.gcd,
    if_neg (Nat.cast_add_one_ne_zero _), this]
state_before: n d : ℤ
this : ∀ (m : ℕ), (↑m + 1).natAbs = m + 1
⊢ (n /. d).den = if d = 0 then 1 else d.natAbs / n.gcd d
state_after: no goals

tactic: rw [← Nat.cast_one, ← Nat.cast_add, Int.natAbs_cast]
state_before: n d : ℤ
m : ℕ
⊢ (↑m + 1).natAbs = m + 1
state_after: no goals
Theorem: ProbabilityTheory.condCount_eq_zero_iff
File: Mathlib/Probability/CondCount.lean

tactic: simp [condCount, cond_apply _ hs.measurableSet, Measure.count_apply_eq_top, Set.not_infinite.2 hs,
  Measure.count_apply_finite _ (hs.inter_of_left _)]
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : s.Finite
⊢ (condCount s) t = 0 ↔ s ∩ t = ∅
state_after: no goals
Theorem: Ordinal.opow_isNormal
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: simpa only [mul_one, opow_succ] using (mul_lt_mul_iff_left (opow_pos b a0)).2 h
state_before: a : Ordinal.{u_1}
h : 1 < a
a0 : 0 < a
b : Ordinal.{u_1}
⊢ (fun x => a ^ x) b < (fun x => a ^ x) (succ b)
state_after: no goals
Theorem: isCoprime_group_smul_left
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: rwa [smul_mul_assoc, ← mul_smul_comm]
state_before: R : Type u_1
G : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : Group G
inst✝² : MulAction G R
inst✝¹ : SMulCommClass G R R
inst✝ : IsScalarTower G R R
x : G
y z : R
x✝ : IsCoprime (x • y) z
a b : R
h : a * x • y + b * z = 1
⊢ x • a * y + b * z = 1
state_after: no goals

tactic: rwa [smul_mul_smul, inv_mul_self, one_smul]
state_before: R : Type u_1
G : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : Group G
inst✝² : MulAction G R
inst✝¹ : SMulCommClass G R R
inst✝ : IsScalarTower G R R
x : G
y z : R
x✝ : IsCoprime y z
a b : R
h : a * y + b * z = 1
⊢ x⁻¹ • a * x • y + b * z = 1
state_after: no goals
Theorem: SchwartzMap.coeHom_injective
File: Mathlib/Analysis/Distribution/SchwartzSpace.lean

tactic: rw [coe_coeHom]
state_before: 𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
V : Type u_7
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
⊢ Function.Injective ⇑(coeHom E F)
state_after: 𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
V : Type u_7
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
⊢ Function.Injective DFunLike.coe

tactic: exact DFunLike.coe_injective
state_before: 𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
V : Type u_7
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
⊢ Function.Injective DFunLike.coe
state_after: no goals
Theorem: Finset.ofDual_min'
File: Mathlib/Data/Finset/Lattice.lean

tactic: rw [← WithBot.coe_eq_coe]
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 : α
s : Finset αᵒᵈ
hs : s.Nonempty
⊢ ofDual (s.min' hs) = (image (⇑ofDual) s).max' ⋯
state_after: 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 : α
s : Finset αᵒᵈ
hs : s.Nonempty
⊢ ↑(ofDual (s.min' hs)) = ↑((image (⇑ofDual) s).max' ⋯)

tactic: simp only [min'_eq_inf', id_eq, ofDual_inf', Function.comp_apply, coe_sup', max'_eq_sup',
  sup_image]
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 : α
s : Finset αᵒᵈ
hs : s.Nonempty
⊢ ↑(ofDual (s.min' hs)) = ↑((image (⇑ofDual) s).max' ⋯)
state_after: 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 : α
s : Finset αᵒᵈ
hs : s.Nonempty
⊢ s.sup (WithBot.some ∘ fun x => ofDual x) = s.sup ((WithBot.some ∘ fun x => x) ∘ ⇑ofDual)

tactic: rfl
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 : α
s : Finset αᵒᵈ
hs : s.Nonempty
⊢ s.sup (WithBot.some ∘ fun x => ofDual x) = s.sup ((WithBot.some ∘ fun x => x) ∘ ⇑ofDual)
state_after: no goals
Theorem: CategoryTheory.Functor.FullyFaithful.hasShift.map_add_inv_app
File: Mathlib/CategoryTheory/Shift/Basic.lean

tactic: dsimp [add]
state_before: C : Type u
A : Type u_1
inst✝³ : Category.{v, u} C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : AddMonoid A
inst✝ : HasShift D A
F : C ⥤ D
hF : F.FullyFaithful
s : A → C ⥤ C
i : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i
a b : A
X : C
⊢ F.map ((add hF s i a b).inv.app X) =
    (i b).hom.app ((s a).obj X) ≫
      (shiftFunctor D b).map ((i a).hom.app X) ≫ (shiftFunctorAdd D a b).inv.app (F.obj X) ≫ (i (a + b)).inv.app X
state_after: C : Type u
A : Type u_1
inst✝³ : Category.{v, u} C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : AddMonoid A
inst✝ : HasShift D A
F : C ⥤ D
hF : F.FullyFaithful
s : A → C ⥤ C
i : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i
a b : A
X : C
⊢ F.map
      (hF.preimage
        ((((((𝟙 (F.obj ((s b).obj ((s a).obj X))) ≫ (i b).hom.app ((s a).obj X)) ≫
                  𝟙 ((shiftFunctor D b).obj (F.obj ((s a).obj X)))) ≫
                (shiftFunctor D b).map ((i a).hom.app X)) ≫
              𝟙 ((shiftFunctor D b).obj ((shiftFunctor D a).obj (F.obj X)))) ≫
            (shiftFunctorAdd D a b).inv.app (F.obj X)) ≫
          (i (a + b)).inv.app X)) =
    (i b).hom.app ((s a).obj X) ≫
      (shiftFunctor D b).map ((i a).hom.app X) ≫ (shiftFunctorAdd D a b).inv.app (F.obj X) ≫ (i (a + b)).inv.app X

tactic: simp
state_before: C : Type u
A : Type u_1
inst✝³ : Category.{v, u} C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : AddMonoid A
inst✝ : HasShift D A
F : C ⥤ D
hF : F.FullyFaithful
s : A → C ⥤ C
i : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i
a b : A
X : C
⊢ F.map
      (hF.preimage
        ((((((𝟙 (F.obj ((s b).obj ((s a).obj X))) ≫ (i b).hom.app ((s a).obj X)) ≫
                  𝟙 ((shiftFunctor D b).obj (F.obj ((s a).obj X)))) ≫
                (shiftFunctor D b).map ((i a).hom.app X)) ≫
              𝟙 ((shiftFunctor D b).obj ((shiftFunctor D a).obj (F.obj X)))) ≫
            (shiftFunctorAdd D a b).inv.app (F.obj X)) ≫
          (i (a + b)).inv.app X)) =
    (i b).hom.app ((s a).obj X) ≫
      (shiftFunctor D b).map ((i a).hom.app X) ≫ (shiftFunctorAdd D a b).inv.app (F.obj X) ≫ (i (a + b)).inv.app X
state_after: no goals