tasksource/leandojo huggingface dataset:
Theorem: CompositionSeries.toList_ofList
File: Mathlib/Order/JordanHolder.lean

tactic: refine' List.ext_get _ _
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
l : List X
hl : l ≠ []
hc : List.Chain' IsMaximal l
⊢ toList (ofList l hl hc) = l

tactic: rw [length_toList, length_ofList,
  tsub_add_cancel_of_le (Nat.succ_le_of_lt <| List.length_pos_of_ne_nil hl)]
state_before: case refine'_1
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
l : List X
hl : l ≠ []
hc : List.Chain' IsMaximal l
⊢ List.length (toList (ofList l hl hc)) = List.length l

tactic: intro i hi hi'
state_before: case refine'_2
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
l : List X
hl : l ≠ []
hc : List.Chain' IsMaximal l
⊢ ∀ (n : ℕ) (h₁ : n < List.length (toList (ofList l hl hc))) (h₂ : n < List.length l),
    List.get (toList (ofList l hl hc)) { val := n, isLt := h₁ } = List.get l { val := n, isLt := h₂ }

tactic: dsimp [ofList, toList]
state_before: case refine'_2
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
l : List X
hl : l ≠ []
hc : List.Chain' IsMaximal l
i : ℕ
hi : i < List.length (toList (ofList l hl hc))
hi' : i < List.length l
⊢ List.get (toList (ofList l hl hc)) { val := i, isLt := hi } = List.get l { val := i, isLt := hi' }

tactic: rw [List.get_ofFn]
state_before: case refine'_2
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
l : List X
hl : l ≠ []
hc : List.Chain' IsMaximal l
i : ℕ
hi : i < List.length (toList (ofList l hl hc))
hi' : i < List.length l
⊢ List.get (List.ofFn fun i => List.nthLe l ↑i (_ : ↑i < List.length l)) { val := i, isLt := hi } =
    List.get l { val := i, isLt := hi' }

tactic: rfl
state_before: case refine'_2
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
l : List X
hl : l ≠ []
hc : List.Chain' IsMaximal l
i : ℕ
hi : i < List.length (toList (ofList l hl hc))
hi' : i < List.length l
⊢ List.nthLe l
      ↑(↑(Fin.cast
              (_ : List.length (List.ofFn fun i => List.nthLe l ↑i (_ : ↑i < List.length l)) = List.length l - 1 + 1))
          { val := i, isLt := hi })
      (_ :
        ↑(↑(Fin.cast
                  (_ :
                    List.length (List.ofFn fun i => List.nthLe l ↑i (_ : ↑i < List.length l)) = List.length l - 1 + 1))
              { val := i, isLt := hi }) <
          List.length l) =
    List.get l { val := i, isLt := hi' }
Theorem: Bool.xor_left_comm
File: Mathlib/Data/Bool/Basic.lean

tactic: decide
state_before: ⊢ ∀ (a b c : Bool), xor a (xor b c) = xor b (xor a c)
Theorem: MeasureTheory.snorm'_eq_zero_of_ae_zero
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [snorm'_congr_ae hf_zero, snorm'_zero hq0_lt]
state_before: α : Type u_1
E : Type ?u.2312986
F : Type u_2
G : Type ?u.2312992
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
hf_zero : f =ᵐ[μ] 0
⊢ snorm' f q μ = 0
Theorem: ext_inner_map
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [← sub_eq_zero, ← inner_map_self_eq_zero]
state_before: 𝕜 : Type ?u.2756723
E : Type ?u.2756726
F : Type ?u.2756729
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
dec_E : DecidableEq E
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℂ V
S T : V →ₗ[ℂ] V
⊢ (∀ (x : V), inner (↑S x) x = inner (↑T x) x) ↔ S = T

tactic: refine' forall_congr' fun x => _
state_before: 𝕜 : Type ?u.2756723
E : Type ?u.2756726
F : Type ?u.2756729
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
dec_E : DecidableEq E
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℂ V
S T : V →ₗ[ℂ] V
⊢ (∀ (x : V), inner (↑S x) x = inner (↑T x) x) ↔ ∀ (x : V), inner (↑(S - T) x) x = 0

tactic: rw [LinearMap.sub_apply, inner_sub_left, sub_eq_zero]
state_before: 𝕜 : Type ?u.2756723
E : Type ?u.2756726
F : Type ?u.2756729
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
dec_E : DecidableEq E
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℂ V
S T : V →ₗ[ℂ] V
x : V
⊢ inner (↑S x) x = inner (↑T x) x ↔ inner (↑(S - T) x) x = 0
Theorem: Dfinsupp.prod_subtypeDomain_index
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: simp
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝³ : (i : ι) → Zero (β i)
inst✝² : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝¹ : CommMonoid γ
v : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
h : (i : ι) → β i → γ
hp : ∀ (x : ι), x ∈ support v → p x
⊢ ∀ (a : Subtype p) (ha : a ∈ support (subtypeDomain p v)), (fun p_1 x => ↑p_1) a ha ∈ support v

tactic: simp
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝³ : (i : ι) → Zero (β i)
inst✝² : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝¹ : CommMonoid γ
v : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
h : (i : ι) → β i → γ
hp : ∀ (x : ι), x ∈ support v → p x
⊢ ∀ (a : Subtype p) (ha : a ∈ support (subtypeDomain p v)),
    (fun i b => h (↑i) b) a (↑(subtypeDomain p v) a) = h ((fun p_1 x => ↑p_1) a ha) (↑v ((fun p_1 x => ↑p_1) a ha))

tactic: simp
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝³ : (i : ι) → Zero (β i)
inst✝² : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝¹ : CommMonoid γ
v : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
h : (i : ι) → β i → γ
hp : ∀ (x : ι), x ∈ support v → p x
x✝¹ x✝ : Subtype p
a₀ : ι
ha₀ : p a₀
a₁ : ι
ha₁ : p a₁
⊢ ∀ (ha₁_1 : { val := a₀, property := ha₀ } ∈ support (subtypeDomain p v))
    (ha₂ : { val := a₁, property := ha₁ } ∈ support (subtypeDomain p v)),
    (fun p_1 x => ↑p_1) { val := a₀, property := ha₀ } ha₁_1 = (fun p_1 x => ↑p_1) { val := a₁, property := ha₁ } ha₂ →
      { val := a₀, property := ha₀ } = { val := a₁, property := ha₁ }

tactic: simpa using hi
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝³ : (i : ι) → Zero (β i)
inst✝² : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝¹ : CommMonoid γ
v : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
h : (i : ι) → β i → γ
hp : ∀ (x : ι), x ∈ support v → p x
i : ι
hi : i ∈ support v
⊢ { val := i, property := (_ : p i) } ∈ support (subtypeDomain p v)
Theorem: Int.isUnit_sq
File: Mathlib/Data/Int/Order/Units.lean

tactic: rw [sq, isUnit_mul_self ha]
state_before: a : ℤ
ha : IsUnit a
⊢ a ^ 2 = 1
Theorem: Submonoid.LocalizationMap.mk'_self'
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: rw [mul_inv_left, mul_one]
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type ?u.911590
inst✝ : CommMonoid P
f : LocalizationMap S N
y : { x // x ∈ S }
⊢ ↑(toMap f) ↑y *
      ↑(↑(IsUnit.liftRight (MonoidHom.restrict (toMap f) S) (_ : ∀ (y : { x // x ∈ S }), IsUnit (↑(toMap f) ↑y))) y)⁻¹ =
    1
Theorem: CircleDeg1Lift.commute_nat_add
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simpa only [nsmul_one, add_left_iterate] using Function.Commute.iterate_right f.map_one_add n
state_before: f g : CircleDeg1Lift
n : ℕ
⊢ Function.Commute ↑f fun x => ↑n + x
Theorem: Ring.inverse_eq_inv
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: obtain rfl | ha := eq_or_ne a 0
state_before: α : Type ?u.20396
M₀ : Type ?u.20399
G₀ : Type u_1
M₀' : Type ?u.20405
G₀' : Type ?u.20408
F : Type ?u.20411
F' : Type ?u.20414
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
⊢ inverse a = a⁻¹

tactic: simp
state_before: case inl
α : Type ?u.20396
M₀ : Type ?u.20399
G₀ : Type u_1
M₀' : Type ?u.20405
G₀' : Type ?u.20408
F : Type ?u.20411
F' : Type ?u.20414
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c : G₀
⊢ inverse 0 = 0⁻¹

tactic: exact Ring.inverse_unit (Units.mk0 a ha)
state_before: case inr
α : Type ?u.20396
M₀ : Type ?u.20399
G₀ : Type u_1
M₀' : Type ?u.20405
G₀' : Type ?u.20408
F : Type ?u.20411
F' : Type ?u.20414
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
ha : a ≠ 0
⊢ inverse a = a⁻¹
Theorem: Complex.arg_cos_add_sin_mul_I_eq_toIocMod
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: rw [← one_mul (_ + _), ← ofReal_one, arg_mul_cos_add_sin_mul_I_eq_toIocMod zero_lt_one]
state_before: θ : ℝ
⊢ arg (cos ↑θ + sin ↑θ * I) = toIocMod two_pi_pos (-π) θ
Theorem: thickenedIndicator_le_one
File: Mathlib/Topology/MetricSpace/ThickenedIndicator.lean

tactic: rw [thickenedIndicator.coeFn_eq_comp]
state_before: α : Type u_1
inst✝ : PseudoEMetricSpace α
δ : ℝ
δ_pos : 0 < δ
E : Set α
x : α
⊢ ↑(thickenedIndicator δ_pos E) x ≤ 1

tactic: simpa using (toNNReal_le_toNNReal thickenedIndicatorAux_lt_top.ne one_ne_top).mpr
  (thickenedIndicatorAux_le_one δ E x)
state_before: α : Type u_1
inst✝ : PseudoEMetricSpace α
δ : ℝ
δ_pos : 0 < δ
E : Set α
x : α
⊢ (ENNReal.toNNReal ∘ thickenedIndicatorAux δ E) x ≤ 1
Theorem: Multiset.pi.cons_eta
File: Mathlib/Data/Multiset/Pi.lean

tactic: ext (a' h')
state_before: α : Type u_1
inst✝ : DecidableEq α
β : α → Type u
δ : α → Sort v
m : Multiset α
a : α
f : (a' : α) → a' ∈ a ::ₘ m → δ a'
⊢ (Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) fun a' ha' => f a' (_ : a' ∈ a ::ₘ m)) = f

tactic: by_cases h : a' = a
state_before: case h.h
α : Type u_1
inst✝ : DecidableEq α
β : α → Type u
δ : α → Sort v
m : Multiset α
a : α
f : (a' : α) → a' ∈ a ::ₘ m → δ a'
a' : α
h' : a' ∈ a ::ₘ m
⊢ Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) (fun a' ha' => f a' (_ : a' ∈ a ::ₘ m)) a' h' = f a' h'

tactic: subst h
state_before: case pos
α : Type u_1
inst✝ : DecidableEq α
β : α → Type u
δ : α → Sort v
m : Multiset α
a : α
f : (a' : α) → a' ∈ a ::ₘ m → δ a'
a' : α
h' : a' ∈ a ::ₘ m
h : a' = a
⊢ Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) (fun a' ha' => f a' (_ : a' ∈ a ::ₘ m)) a' h' = f a' h'

tactic: rw [Pi.cons_same]
state_before: case pos
α : Type u_1
inst✝ : DecidableEq α
β : α → Type u
δ : α → Sort v
m : Multiset α
a' : α
f : (a'_1 : α) → a'_1 ∈ a' ::ₘ m → δ a'_1
h' : a' ∈ a' ::ₘ m
⊢ Pi.cons m a' (f a' (_ : a' ∈ a' ::ₘ m)) (fun a'_1 ha' => f a'_1 (_ : a'_1 ∈ a' ::ₘ m)) a' h' = f a' h'

tactic: rw [Pi.cons_ne _ h]
state_before: case neg
α : Type u_1
inst✝ : DecidableEq α
β : α → Type u
δ : α → Sort v
m : Multiset α
a : α
f : (a' : α) → a' ∈ a ::ₘ m → δ a'
a' : α
h' : a' ∈ a ::ₘ m
h : ¬a' = a
⊢ Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) (fun a' ha' => f a' (_ : a' ∈ a ::ₘ m)) a' h' = f a' h'
Theorem: rank_quotient_add_rank
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: classical
  let ⟨f⟩ := quotient_prod_linearEquiv p
  exact rank_prod'.symm.trans f.rank_eq
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.574502
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
inst✝³ : AddCommGroup V'
inst✝² : Module K V'
inst✝¹ : AddCommGroup V₁
inst✝ : Module K V₁
p : Submodule K V
⊢ Module.rank K (V ⧸ p) + Module.rank K { x // x ∈ p } = Module.rank K V

tactic: let ⟨f⟩ := quotient_prod_linearEquiv p
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.574502
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
inst✝³ : AddCommGroup V'
inst✝² : Module K V'
inst✝¹ : AddCommGroup V₁
inst✝ : Module K V₁
p : Submodule K V
⊢ Module.rank K (V ⧸ p) + Module.rank K { x // x ∈ p } = Module.rank K V

tactic: exact rank_prod'.symm.trans f.rank_eq
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.574502
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
inst✝³ : AddCommGroup V'
inst✝² : Module K V'
inst✝¹ : AddCommGroup V₁
inst✝ : Module K V₁
p : Submodule K V
f : ((V ⧸ p) × { x // x ∈ p }) ≃ₗ[K] V
⊢ Module.rank K (V ⧸ p) + Module.rank K { x // x ∈ p } = Module.rank K V
Theorem: Matrix.vecMulᵣ_eq
File: Mathlib/Data/Matrix/Reflection.lean

tactic: simp [vecMulᵣ, Function.comp]
state_before: l m n : ℕ
α : Type u_1
β : Type ?u.51370
inst✝ : NonUnitalNonAssocSemiring α
v : Fin l → α
A : Matrix (Fin l) (Fin m) α
⊢ vecMulᵣ v A = vecMul v A

tactic: rfl
state_before: l m n : ℕ
α : Type u_1
β : Type ?u.51370
inst✝ : NonUnitalNonAssocSemiring α
v : Fin l → α
A : Matrix (Fin l) (Fin m) α
⊢ (fun x => v ⬝ᵥ Aᵀ x) = vecMul v A
Theorem: Right.mul_pos
File: Mathlib/Algebra/Order/Ring/Lemmas.lean

tactic: simpa only [zero_mul] using mul_lt_mul_of_pos_right ha hb
state_before: α : Type u_1
a b c d : α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
ha : 0 < a
hb : 0 < b
⊢ 0 < a * b
Theorem: wittPolynomial_vars_subset
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: rw [← map_wittPolynomial p (Int.castRingHom R), ← wittPolynomial_vars p ℤ]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.160515
inst✝ : CommRing S
hp : NeZero p
n : ℕ
⊢ vars (W_ R n) ⊆ range (n + 1)

tactic: apply vars_map
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.160515
inst✝ : CommRing S
hp : NeZero p
n : ℕ
⊢ vars (↑(map (Int.castRingHom R)) (W_ ℤ n)) ⊆ vars (W_ ℤ n)
Theorem: MeasurableSet.measurableSet_liminf
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: simpa only [← bliminf_true] using measurableSet_bliminf fun n _ => hs n
state_before: α : Type u_1
β : Type ?u.912543
γ : Type ?u.912546
δ : Type ?u.912549
δ' : Type ?u.912552
ι : Sort uι
s✝ t u : Set α
inst✝ : MeasurableSpace α
s : ℕ → Set α
hs : ∀ (n : ℕ), MeasurableSet (s n)
⊢ MeasurableSet (liminf s atTop)
Theorem: Algebra.TensorProduct.basisAux_map_smul
File: Mathlib/RingTheory/TensorProduct.lean

tactic: simp
state_before: k : Type u_1
inst✝⁴ : CommRing k
R : Type u_2
inst✝³ : Ring R
inst✝² : Algebra k R
M : Type u_3
inst✝¹ : AddCommMonoid M
inst✝ : Module k M
ι : Type u_4
b : Basis ι k M
r : R
x : R ⊗[k] M
⊢ ↑(basisAux R b) (r • 0) = r • ↑(basisAux R b) 0

tactic: simp only [TensorProduct.smul_tmul', basisAux_tmul, smul_assoc]
state_before: k : Type u_1
inst✝⁴ : CommRing k
R : Type u_2
inst✝³ : Ring R
inst✝² : Algebra k R
M : Type u_3
inst✝¹ : AddCommMonoid M
inst✝ : Module k M
ι : Type u_4
b : Basis ι k M
r : R
x✝ : R ⊗[k] M
x : R
y : M
⊢ ↑(basisAux R b) (r • x ⊗ₜ[k] y) = r • ↑(basisAux R b) (x ⊗ₜ[k] y)

tactic: simp [hx, hy]
state_before: k : Type u_1
inst✝⁴ : CommRing k
R : Type u_2
inst✝³ : Ring R
inst✝² : Algebra k R
M : Type u_3
inst✝¹ : AddCommMonoid M
inst✝ : Module k M
ι : Type u_4
b : Basis ι k M
r : R
x✝ x y : R ⊗[k] M
hx : ↑(basisAux R b) (r • x) = r • ↑(basisAux R b) x
hy : ↑(basisAux R b) (r • y) = r • ↑(basisAux R b) y
⊢ ↑(basisAux R b) (r • (x + y)) = r • ↑(basisAux R b) (x + y)
Theorem: String.utf8Len_reverseAux
File: Std/Data/String/Lemmas.lean

tactic: induction cs₁ generalizing cs₂ <;> simp [*, ← Nat.add_assoc, Nat.add_right_comm]
state_before: cs₁ cs₂ : List Char
⊢ utf8Len (List.reverseAux cs₁ cs₂) = utf8Len cs₁ + utf8Len cs₂
Theorem: Real.rpow_lt_one_of_one_lt_of_neg
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: convert rpow_lt_rpow_of_exponent_lt hx hz
state_before: x✝ y z✝ x z : ℝ
hx : 1 < x
hz : z < 0
⊢ x ^ z < 1

tactic: exact (rpow_zero x).symm
state_before: case h.e'_4
x✝ y z✝ x z : ℝ
hx : 1 < x
hz : z < 0
⊢ 1 = x ^ 0
Theorem: PNat.le_find_iff
File: Mathlib/Data/PNat/Find.lean

tactic: simp only [← not_lt, find_lt_iff, not_exists, not_and]
state_before: p q : ℕ+ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
h : ∃ n, p n
n✝ m n : ℕ+
⊢ n ≤ PNat.find h ↔ ∀ (m : ℕ+), m < n → ¬p m
Theorem: LucasLehmer.sZMod_eq_sMod
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: induction i <;> push_cast [← Int.coe_nat_two_pow_pred p, sMod, sZMod, *] <;> rfl
state_before: p i : ℕ
⊢ sZMod p i = ↑(sMod p i)
Theorem: NormedAddGroupHom.lift_normNoninc
File: Mathlib/Analysis/Normed/Group/Quotient.lean

tactic: have fb' : ‖f‖ ≤ (1 : ℝ≥0) := NormNoninc.normNoninc_iff_norm_le_one.mp fb
state_before: M : Type u_2
N✝ : Type ?u.479189
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_1
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
fb : NormNoninc f
x : M ⧸ S
⊢ ‖↑(lift S f hf) x‖ ≤ ‖x‖

tactic: simpa using le_of_opNorm_le _ (f.lift_norm_le _ _ fb') _
state_before: M : Type u_2
N✝ : Type ?u.479189
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_1
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
fb : NormNoninc f
x : M ⧸ S
fb' : ‖f‖ ≤ ↑1
⊢ ‖↑(lift S f hf) x‖ ≤ ‖x‖
Theorem: Matrix.aeval_self_charpoly
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean

tactic: have h : M.charpoly • (1 : Matrix n n R[X]) = adjugate (charmatrix M) * charmatrix M :=
  (adjugate_mul _).symm
state_before: R : Type u
inst✝² : CommRing R
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : Matrix n n R
⊢ ↑(aeval M) (charpoly M) = 0

tactic: apply_fun matPolyEquiv  at h
state_before: R : Type u
inst✝² : CommRing R
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : Matrix n n R
h : charpoly M • 1 = adjugate (charmatrix M) * charmatrix M
⊢ ↑(aeval M) (charpoly M) = 0

tactic: simp only [matPolyEquiv.map_mul, matPolyEquiv_charmatrix] at h
state_before: R : Type u
inst✝² : CommRing R
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : Matrix n n R
h : ↑matPolyEquiv (charpoly M • 1) = ↑matPolyEquiv (adjugate (charmatrix M) * charmatrix M)
⊢ ↑(aeval M) (charpoly M) = 0

tactic: apply_fun fun p => p.eval M  at h
state_before: R : Type u
inst✝² : CommRing R
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : Matrix n n R
h : ↑matPolyEquiv (charpoly M • 1) = ↑matPolyEquiv (adjugate (charmatrix M)) * (X - ↑C M)
⊢ ↑(aeval M) (charpoly M) = 0

tactic: rw [eval_mul_X_sub_C] at h
state_before: R : Type u
inst✝² : CommRing R
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : Matrix n n R
h : eval M (↑matPolyEquiv (charpoly M • 1)) = eval M (↑matPolyEquiv (adjugate (charmatrix M)) * (X - ↑C M))
⊢ ↑(aeval M) (charpoly M) = 0

tactic: rw [matPolyEquiv_smul_one, eval_map] at h
state_before: R : Type u
inst✝² : CommRing R
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : Matrix n n R
h : eval M (↑matPolyEquiv (charpoly M • 1)) = 0
⊢ ↑(aeval M) (charpoly M) = 0

tactic: exact h
state_before: R : Type u
inst✝² : CommRing R
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : Matrix n n R
h : eval₂ (algebraMap R (Matrix n n R)) M (charpoly M) = 0
⊢ ↑(aeval M) (charpoly M) = 0
Theorem: Real.log_nonpos_iff
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: rw [← not_lt, log_pos_iff hx, not_lt]
state_before: x y : ℝ
hx : 0 < x
⊢ log x ≤ 0 ↔ x ≤ 1
Theorem: MeasureTheory.weightedSMul_empty
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: ext1 x
state_before: α : Type u_1
E : Type ?u.19408
F : Type u_2
𝕜 : Type ?u.19414
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
m✝ : MeasurableSpace α
μ✝ : Measure α
m : MeasurableSpace α
μ : Measure α
⊢ weightedSMul μ ∅ = 0

tactic: rw [weightedSMul_apply]
state_before: case h
α : Type u_1
E : Type ?u.19408
F : Type u_2
𝕜 : Type ?u.19414
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
m✝ : MeasurableSpace α
μ✝ : Measure α
m : MeasurableSpace α
μ : Measure α
x : F
⊢ ↑(weightedSMul μ ∅) x = ↑0 x

tactic: simp
state_before: case h
α : Type u_1
E : Type ?u.19408
F : Type u_2
𝕜 : Type ?u.19414
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
m✝ : MeasurableSpace α
μ✝ : Measure α
m : MeasurableSpace α
μ : Measure α
x : F
⊢ ENNReal.toReal (↑↑μ ∅) • x = ↑0 x
Theorem: Int.lt_of_sum_four_squares_eq_mul
File: Mathlib/NumberTheory/SumFourSquares.lean

tactic: refine lt_of_mul_lt_mul_right (lt_of_mul_lt_mul_left ?_ (zero_le (2 ^ 2))) (zero_le m)
state_before: a b c d k m : ℕ
h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m
ha : 2 * a < m
hb : 2 * b < m
hc : 2 * c < m
hd : 2 * d < m
⊢ k < m

tactic: calc
  2 ^ 2 * (k * ↑m) = ∑ i : Fin 4, (2 * ![a, b, c, d] i) ^ 2 := by
    simp [← h, Fin.sum_univ_succ, mul_add, mul_pow, add_assoc]
  _ < ∑ _i : Fin 4, m ^ 2 := Finset.sum_lt_sum_of_nonempty Finset.univ_nonempty fun i _ ↦ by
    refine pow_lt_pow_of_lt_left ?_ (zero_le _) two_pos
    fin_cases i <;> assumption
  _ = 2 ^ 2 * (m * m) := by simp; ring
state_before: a b c d k m : ℕ
h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m
ha : 2 * a < m
hb : 2 * b < m
hc : 2 * c < m
hd : 2 * d < m
⊢ 2 ^ 2 * (k * m) < 2 ^ 2 * (m * m)

tactic: simp [← h, Fin.sum_univ_succ, mul_add, mul_pow, add_assoc]
state_before: a b c d k m : ℕ
h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m
ha : 2 * a < m
hb : 2 * b < m
hc : 2 * c < m
hd : 2 * d < m
⊢ 2 ^ 2 * (k * m) = ∑ i : Fin 4, (2 * Matrix.vecCons a ![b, c, d] i) ^ 2

tactic: refine pow_lt_pow_of_lt_left ?_ (zero_le _) two_pos
state_before: a b c d k m : ℕ
h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m
ha : 2 * a < m
hb : 2 * b < m
hc : 2 * c < m
hd : 2 * d < m
i : Fin 4
x✝ : i ∈ univ
⊢ (2 * Matrix.vecCons a ![b, c, d] i) ^ 2 < m ^ 2

tactic: fin_cases i <;> assumption
state_before: a b c d k m : ℕ
h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m
ha : 2 * a < m
hb : 2 * b < m
hc : 2 * c < m
hd : 2 * d < m
i : Fin 4
x✝ : i ∈ univ
⊢ 2 * Matrix.vecCons a ![b, c, d] i < m

tactic: simp
state_before: a b c d k m : ℕ
h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m
ha : 2 * a < m
hb : 2 * b < m
hc : 2 * c < m
hd : 2 * d < m
⊢ ∑ _i : Fin 4, m ^ 2 = 2 ^ 2 * (m * m)

tactic: ring
state_before: a b c d k m : ℕ
h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m
ha : 2 * a < m
hb : 2 * b < m
hc : 2 * c < m
hd : 2 * d < m
⊢ 4 * m ^ 2 = 2 ^ 2 * (m * m)
Theorem: FixedPoints.minpoly.eval₂
File: Mathlib/FieldTheory/Fixed.lean

tactic: rw [← prodXSubSmul.eval G F x, Polynomial.eval₂_eq_eval_map]
state_before: M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
⊢ Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x (minpoly G F x) = 0

tactic: simp only [minpoly, Polynomial.map_toSubring]
state_before: M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
⊢ Polynomial.eval x (Polynomial.map (Subring.subtype (subfield G F).toSubring) (minpoly G F x)) =
    Polynomial.eval x (prodXSubSmul G F x)