tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.snorm_add_lt_top
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: apply ENNReal.mul_lt_top (LpAddConst_lt_top p).ne
state_before: α : Type u_2
E : Type u_1
F : Type ?u.3052566
G : Type ?u.3052569
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : α → E
hf : Memℒp f p
hg : Memℒp g p
⊢ LpAddConst p * (snorm f p μ + snorm g p μ) < ⊤

tactic: exact (ENNReal.add_lt_top.2 ⟨hf.2, hg.2⟩).ne
state_before: α : Type u_2
E : Type u_1
F : Type ?u.3052566
G : Type ?u.3052569
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : α → E
hf : Memℒp f p
hg : Memℒp g p
⊢ snorm f p μ + snorm g p μ ≠ ⊤
Theorem: Subsemigroup.coe_iInf
File: Mathlib/GroupTheory/Subsemigroup/Basic.lean

tactic: simp only [iInf, coe_sInf, Set.biInter_range]
state_before: M : Type u_2
N : Type ?u.9662
A : Type ?u.9665
inst✝¹ : Mul M
s : Set M
inst✝ : Add A
t : Set A
S✝ : Subsemigroup M
ι : Sort u_1
S : ι → Subsemigroup M
⊢ ↑(⨅ (i : ι), S i) = ⋂ (i : ι), ↑(S i)
Theorem: ENNReal.add_halves
File: Mathlib/Data/Real/ENNReal.lean

tactic: rw [div_eq_mul_inv, ← mul_add, inv_two_add_inv_two, mul_one]
state_before: α : Type ?u.316098
β : Type ?u.316101
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ a / 2 + a / 2 = a
Theorem: Polynomial.isCoprime_X_sub_C_of_isUnit_sub
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [neg_mul_comm, ← left_distrib, neg_add_eq_sub, sub_sub_sub_cancel_left, ← C_sub, ← C_mul]
state_before: R✝ : Type u
S : Type v
T : Type w
a✝ b✝ : R✝
n : ℕ
inst✝² : CommRing R✝
inst✝¹ : IsDomain R✝
p q : R✝[X]
R : Type u_1
inst✝ : CommRing R
a b : R
h : IsUnit (a - b)
⊢ -↑C ↑(IsUnit.unit h)⁻¹ * (X - ↑C a) + ↑C ↑(IsUnit.unit h)⁻¹ * (X - ↑C b) = 1

tactic: rw [←C_1]
state_before: R✝ : Type u
S : Type v
T : Type w
a✝ b✝ : R✝
n : ℕ
inst✝² : CommRing R✝
inst✝¹ : IsDomain R✝
p q : R✝[X]
R : Type u_1
inst✝ : CommRing R
a b : R
h : IsUnit (a - b)
⊢ ↑C (↑(IsUnit.unit h)⁻¹ * (a - b)) = 1

tactic: congr
state_before: R✝ : Type u
S : Type v
T : Type w
a✝ b✝ : R✝
n : ℕ
inst✝² : CommRing R✝
inst✝¹ : IsDomain R✝
p q : R✝[X]
R : Type u_1
inst✝ : CommRing R
a b : R
h : IsUnit (a - b)
⊢ ↑C (↑(IsUnit.unit h)⁻¹ * (a - b)) = ↑C 1

tactic: exact h.val_inv_mul
state_before: case h.e_6.h
R✝ : Type u
S : Type v
T : Type w
a✝ b✝ : R✝
n : ℕ
inst✝² : CommRing R✝
inst✝¹ : IsDomain R✝
p q : R✝[X]
R : Type u_1
inst✝ : CommRing R
a b : R
h : IsUnit (a - b)
⊢ ↑(IsUnit.unit h)⁻¹ * (a - b) = 1
Theorem: witt_structure_prop
File: Mathlib/RingTheory/WittVector/StructurePolynomial.lean

tactic: convert congr_arg (map (Int.castRingHom R)) (wittStructureInt_prop p Φ n) using 1 <;>
    rw [hom_bind₁] <;>
  apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl
state_before: p : ℕ
R : Type u_2
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
⊢ ↑(aeval fun i => ↑(map (Int.castRingHom R)) (wittStructureInt p Φ i)) (W_ ℤ n) =
    ↑(aeval fun i => ↑(rename (Prod.mk i)) (W_ R n)) Φ

tactic: rfl
state_before: p : ℕ
R : Type u_2
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
⊢ (fun i => ↑(map (Int.castRingHom R)) (wittStructureInt p Φ i)) = fun i =>
    ↑(map (Int.castRingHom R)) (wittStructureInt p Φ i)

tactic: simp only [map_rename, map_wittPolynomial]
state_before: p : ℕ
R : Type u_2
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
⊢ (fun i => ↑(rename (Prod.mk i)) (W_ R n)) = fun i => ↑(map (Int.castRingHom R)) (↑(rename (Prod.mk i)) (W_ ℤ n))
Theorem: Ordinal.dvd_antisymm
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: subst a
state_before: α : Type ?u.254011
β : Type ?u.254014
γ : Type ?u.254017
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal
h₁ : a ∣ b
h₂ : b ∣ a
a0 : a = 0
⊢ a = b

tactic: exact (eq_zero_of_zero_dvd h₁).symm
state_before: α : Type ?u.254011
β : Type ?u.254014
γ : Type ?u.254017
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
b : Ordinal
h₁ : 0 ∣ b
h₂ : b ∣ 0
⊢ 0 = b

tactic: subst b
state_before: α : Type ?u.254011
β : Type ?u.254014
γ : Type ?u.254017
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal
h₁ : a ∣ b
h₂ : b ∣ a
a0 : ¬a = 0
b0 : b = 0
⊢ a = b

tactic: exact eq_zero_of_zero_dvd h₂
state_before: α : Type ?u.254011
β : Type ?u.254014
γ : Type ?u.254017
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal
a0 : ¬a = 0
h₁ : a ∣ 0
h₂ : 0 ∣ a
⊢ a = 0
Theorem: List.monotone_filter_left
File: Mathlib/Data/List/Basic.lean

tactic: intro x hx
state_before: ι : Type ?u.380238
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p✝ p : α → Bool
l l' : List α
h : l ⊆ l'
⊢ filter p l ⊆ filter p l'

tactic: rw [mem_filter] at hx⊢
state_before: ι : Type ?u.380238
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p✝ p : α → Bool
l l' : List α
h : l ⊆ l'
x : α
hx : x ∈ filter p l
⊢ x ∈ filter p l'

tactic: exact ⟨h hx.left, hx.right⟩
state_before: ι : Type ?u.380238
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p✝ p : α → Bool
l l' : List α
h : l ⊆ l'
x : α
hx : x ∈ l ∧ p x = true
⊢ x ∈ l' ∧ p x = true
Theorem: Submodule.span_singleton_eq_bot
File: Mathlib/LinearAlgebra/Span.lean

tactic: simp
state_before: R : Type u_2
R₂ : Type ?u.182651
K : Type ?u.182654
M : Type u_1
M₂ : Type ?u.182660
V : Type ?u.182663
S : Type ?u.182666
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
⊢ (∀ (x_1 : M), x_1 ∈ {x} → x_1 = 0) ↔ x = 0
Theorem: CategoryTheory.Limits.IsImage.isoExt_hom_m
File: Mathlib/CategoryTheory/Limits/Shapes/Images.lean

tactic: simp
state_before: C : Type u
inst✝ : Category C
X Y : C
f : X ⟶ Y
F F' : MonoFactorisation f
hF : IsImage F
hF' : IsImage F'
⊢ (isoExt hF hF').hom ≫ F'.m = F.m
Theorem: AddMonoidAlgebra.divOf_zero
File: Mathlib/Algebra/MonoidAlgebra/Division.lean

tactic: refine Finsupp.ext fun _ => ?_
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : AddMonoidAlgebra k G
⊢ x /ᵒᶠ 0 = x

tactic: simp only [AddMonoidAlgebra.divOf_apply, zero_add]
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
x : AddMonoidAlgebra k G
x✝ : G
⊢ ↑(x /ᵒᶠ 0) x✝ = ↑x x✝
Theorem: CauSeq.neg_equiv_neg
File: Mathlib/Data/Real/CauSeq.lean

tactic: simpa only [neg_sub'] using neg_limZero hf
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : CauSeq β abv
hf : f ≈ g
⊢ -f ≈ -g
Theorem: Polynomial.C_mul_X_pow_eq_self
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [C_mul_X_pow_eq_monomial, monomial_natDegree_leadingCoeff_eq_self h]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.668511
h : card (support p) ≤ 1
⊢ ↑C (leadingCoeff p) * X ^ natDegree p = p
Theorem: isPrimePow_nat_iff_bounded
File: Mathlib/Algebra/IsPrimePow.lean

tactic: rw [isPrimePow_nat_iff]
state_before: R : Type ?u.82227
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ IsPrimePow n ↔ ∃ p, p ≤ n ∧ ∃ k, k ≤ n ∧ Nat.Prime p ∧ 0 < k ∧ p ^ k = n

tactic: refine' Iff.symm ⟨fun ⟨p, _, k, _, hp, hk, hn⟩ => ⟨p, k, hp, hk, hn⟩, _⟩
state_before: R : Type ?u.82227
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p, p ≤ n ∧ ∃ k, k ≤ n ∧ Nat.Prime p ∧ 0 < k ∧ p ^ k = n

tactic: rintro ⟨p, k, hp, hk, rfl⟩
state_before: R : Type ?u.82227
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) → ∃ p, p ≤ n ∧ ∃ k, k ≤ n ∧ Nat.Prime p ∧ 0 < k ∧ p ^ k = n

tactic: refine' ⟨p, _, k, (Nat.lt_pow_self hp.one_lt _).le, hp, hk, rfl⟩
state_before: case intro.intro.intro.intro
R : Type ?u.82227
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ ∃ p_1, p_1 ≤ p ^ k ∧ ∃ k_1, k_1 ≤ p ^ k ∧ Nat.Prime p_1 ∧ 0 < k_1 ∧ p_1 ^ k_1 = p ^ k

tactic: conv => { lhs; rw [←(pow_one p)] }
state_before: case intro.intro.intro.intro
R : Type ?u.82227
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ p ≤ p ^ k

tactic: exact (Nat.pow_le_iff_le_right hp.two_le).mpr hk
state_before: case intro.intro.intro.intro
R : Type ?u.82227
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ p ^ 1 ≤ p ^ k
Theorem: SimpleGraph.dart_fst_fiber
File: Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean

tactic: ext d
state_before: V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
⊢ filter (fun d => d.fst = v) univ = image (dartOfNeighborSet G v) univ

tactic: simp only [mem_image, true_and_iff, mem_filter, SetCoe.exists, mem_univ, exists_prop_of_true]
state_before: case a
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : Dart G
⊢ d ∈ filter (fun d => d.fst = v) univ ↔ d ∈ image (dartOfNeighborSet G v) univ

tactic: constructor
state_before: case a
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : Dart G
⊢ d.fst = v ↔ ∃ x h, dartOfNeighborSet G v { val := x, property := h } = d

tactic: rintro rfl
state_before: case a.mp
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : Dart G
⊢ d.fst = v → ∃ x h, dartOfNeighborSet G v { val := x, property := h } = d

tactic: exact ⟨_, d.is_adj, by ext <;> rfl⟩
state_before: case a.mp
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
d : Dart G
⊢ ∃ x h, dartOfNeighborSet G d.fst { val := x, property := h } = d

tactic: ext <;> rfl
state_before: V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
d : Dart G
⊢ dartOfNeighborSet G d.fst { val := d.snd, property := (_ : Adj G d.fst d.snd) } = d

tactic: rintro ⟨e, he, rfl⟩
state_before: case a.mpr
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v : V
d : Dart G
⊢ (∃ x h, dartOfNeighborSet G v { val := x, property := h } = d) → d.fst = v

tactic: rfl
state_before: case a.mpr.intro.intro
V : Type u
G : SimpleGraph V
inst✝³ : Fintype V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype (Sym2 V)
inst✝ : DecidableEq V
v e : V
he : e ∈ neighborSet G v
⊢ (dartOfNeighborSet G v { val := e, property := he }).toProd.fst = v
Theorem: contDiff_clm_apply_iff
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: simp_rw [← contDiffOn_univ, contDiffOn_clm_apply]
state_before: 𝕜 : Type u_1
inst✝¹² : NontriviallyNormedField 𝕜
D : Type uD
inst✝¹¹ : NormedAddCommGroup D
inst✝¹⁰ : NormedSpace 𝕜 D
E : Type uE
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type uF
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
G : Type uG
inst✝⁵ : NormedAddCommGroup G
inst✝⁴ : NormedSpace 𝕜 G
X : Type ?u.2824129
inst✝³ : NormedAddCommGroup X
inst✝² : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
inst✝¹ : CompleteSpace 𝕜
n : ℕ∞
f : E → F →L[𝕜] G
inst✝ : FiniteDimensional 𝕜 F
⊢ ContDiff 𝕜 n f ↔ ∀ (y : F), ContDiff 𝕜 n fun x => ↑(f x) y
Theorem: CstarRing.norm_mul_coe_unitary
File: Mathlib/Analysis/NormedSpace/Star/Basic.lean

tactic: simp only [star_star, star_mul]
state_before: 𝕜 : Type ?u.87851
E : Type u_1
α : Type ?u.87857
inst✝² : NormedRing E
inst✝¹ : StarRing E
inst✝ : CstarRing E
A : E
U : { x // x ∈ unitary E }
⊢ ‖A * ↑U‖ = ‖((↑U)⋆ * A⋆)⋆‖

tactic: rw [norm_star]
state_before: 𝕜 : Type ?u.87851
E : Type u_1
α : Type ?u.87857
inst✝² : NormedRing E
inst✝¹ : StarRing E
inst✝ : CstarRing E
A : E
U : { x // x ∈ unitary E }
⊢ ‖((↑U)⋆ * A⋆)⋆‖ = ‖(↑U)⋆ * A⋆‖
Theorem: SimpleGraph.Subgraph.restrict_coeSubgraph
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: ext
state_before: ι : Sort ?u.233581
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
⊢ Subgraph.restrict (Subgraph.coeSubgraph G'') = G''

tactic: simp
state_before: case verts.h
ι : Sort ?u.233581
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
x✝ : ↑G'.verts
⊢ x✝ ∈ (Subgraph.restrict (Subgraph.coeSubgraph G'')).verts ↔ x✝ ∈ G''.verts

tactic: simp only [Relation.Map, comap_Adj, coe_Adj, Subtype.coe_prop, hom_apply, map_Adj,
  SetCoe.exists, Subtype.coe_mk, exists_and_right, exists_eq_right_right, Subtype.coe_eta,
  exists_true_left, exists_eq_right, and_iff_right_iff_imp]
state_before: case Adj.h.h.a
ι : Sort ?u.233581
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
x✝¹ x✝ : ↑G'.verts
⊢ Adj (Subgraph.restrict (Subgraph.coeSubgraph G'')) x✝¹ x✝ ↔ Adj G'' x✝¹ x✝

tactic: apply G''.adj_sub
state_before: case Adj.h.h.a
ι : Sort ?u.233581
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
G'' : Subgraph (Subgraph.coe G')
x✝¹ x✝ : ↑G'.verts
⊢ Adj G'' x✝¹ x✝ → Adj G' ↑x✝¹ ↑x✝
Theorem: dvd_sub_pow_of_dvd_sub
File: Mathlib/NumberTheory/Basic.lean

tactic: induction' k with k ih
state_before: R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
h : ↑p ∣ a - b
k : ℕ
⊢ ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k

tactic: rw [pow_succ' p k, pow_mul, pow_mul, ← geom_sum₂_mul, pow_succ, Nat.cast_mul]
state_before: case succ
R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
h : ↑p ∣ a - b
k : ℕ
ih : ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k
⊢ ↑(p ^ (Nat.succ k + 1)) ∣ a ^ p ^ Nat.succ k - b ^ p ^ Nat.succ k

tactic: refine' mul_dvd_mul _ ih
state_before: case succ
R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
h : ↑p ∣ a - b
k : ℕ
ih : ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k
⊢ ↑p * ↑(p ^ (k + 1)) ∣
    (Finset.sum (Finset.range p) fun i => (a ^ p ^ k) ^ i * (b ^ p ^ k) ^ (p - 1 - i)) * (a ^ p ^ k - b ^ p ^ k)

tactic: let f : R →+* R ⧸ span {(p : R)} := mk (span {(p : R)})
state_before: case succ
R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
h : ↑p ∣ a - b
k : ℕ
ih : ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k
⊢ ↑p ∣ Finset.sum (Finset.range p) fun i => (a ^ p ^ k) ^ i * (b ^ p ^ k) ^ (p - 1 - i)

tactic: have hf : ∀ r : R, (p : R) ∣ r ↔ f r = 0 := fun r ↦ by rw [eq_zero_iff_mem, mem_span_singleton]
state_before: case succ
R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
h : ↑p ∣ a - b
k : ℕ
ih : ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k
f : R →+* R ⧸ span {↑p} := mk (span {↑p})
⊢ ↑p ∣ Finset.sum (Finset.range p) fun i => (a ^ p ^ k) ^ i * (b ^ p ^ k) ^ (p - 1 - i)

tactic: rw [hf, map_sub, sub_eq_zero] at h
state_before: case succ
R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
h : ↑p ∣ a - b
k : ℕ
ih : ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k
f : R →+* R ⧸ span {↑p} := mk (span {↑p})
hf : ∀ (r : R), ↑p ∣ r ↔ ↑f r = 0
⊢ ↑p ∣ Finset.sum (Finset.range p) fun i => (a ^ p ^ k) ^ i * (b ^ p ^ k) ^ (p - 1 - i)

tactic: rw [hf, RingHom.map_geom_sum₂, map_pow, map_pow, h, geom_sum₂_self, mul_eq_zero_of_left]
state_before: case succ
R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
k : ℕ
ih : ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k
f : R →+* R ⧸ span {↑p} := mk (span {↑p})
h : ↑f a = ↑f b
hf : ∀ (r : R), ↑p ∣ r ↔ ↑f r = 0
⊢ ↑p ∣ Finset.sum (Finset.range p) fun i => (a ^ p ^ k) ^ i * (b ^ p ^ k) ^ (p - 1 - i)

tactic: rw [← map_natCast f, eq_zero_iff_mem, mem_span_singleton]
state_before: case succ.h
R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
k : ℕ
ih : ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k
f : R →+* R ⧸ span {↑p} := mk (span {↑p})
h : ↑f a = ↑f b
hf : ∀ (r : R), ↑p ∣ r ↔ ↑f r = 0
⊢ ↑p = 0

tactic: rwa [pow_one, pow_zero, pow_one, pow_one]
state_before: case zero
R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
h : ↑p ∣ a - b
⊢ ↑(p ^ (Nat.zero + 1)) ∣ a ^ p ^ Nat.zero - b ^ p ^ Nat.zero

tactic: rw [eq_zero_iff_mem, mem_span_singleton]
state_before: R : Type u_1
inst✝ : CommRing R
p : ℕ
a b : R
h : ↑p ∣ a - b
k : ℕ
ih : ↑(p ^ (k + 1)) ∣ a ^ p ^ k - b ^ p ^ k
f : R →+* R ⧸ span {↑p} := mk (span {↑p})
r : R
⊢ ↑p ∣ r ↔ ↑f r = 0
Theorem: ContractingWith.dist_fixedPoint_fixedPoint_of_dist_le'
File: Mathlib/Topology/MetricSpace/Contracting.lean

tactic: rw [hy.eq, dist_comm]
state_before: α : Type u_1
inst✝ : MetricSpace α
K : ℝ≥0
f : α → α
hf : ContractingWith K f
g : α → α
x y : α
hx : IsFixedPt f x
hy : IsFixedPt g y
C : ℝ
hfg : ∀ (z : α), dist (f z) (g z) ≤ C
⊢ dist y (f y) / (1 - ↑K) = dist (f y) (g y) / (1 - ↑K)
Theorem: Int.ModEq.cancel_left_div_gcd
File: Mathlib/Data/Int/ModEq.lean

tactic: simpa [mul_comm] using h
state_before: m n a b c d : ℤ
hm : 0 < m
h : c * a ≡ c * b [ZMOD m]
⊢ a * c ≡ b * c [ZMOD m]
Theorem: PrimeSpectrum.t1Space_iff_isField
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: refine' ⟨_, fun h => _⟩
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
⊢ T1Space (PrimeSpectrum R) ↔ IsField R

tactic: intro h
state_before: case refine'_1
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
⊢ T1Space (PrimeSpectrum R) → IsField R

tactic: have hbot : Ideal.IsPrime (⊥ : Ideal R) := Ideal.bot_prime
state_before: case refine'_1
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
h : T1Space (PrimeSpectrum R)
⊢ IsField R

tactic: exact
  Classical.not_not.1
    (mt
      (Ring.ne_bot_of_isMaximal_of_not_isField <|
        (isClosed_singleton_iff_isMaximal _).1 (T1Space.t1 ⟨⊥, hbot⟩))
      (by aesop))
state_before: case refine'_1
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
h : T1Space (PrimeSpectrum R)
hbot : Ideal.IsPrime ⊥
⊢ IsField R

tactic: aesop
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
h : T1Space (PrimeSpectrum R)
hbot : Ideal.IsPrime ⊥
⊢ ¬{ asIdeal := ⊥, IsPrime := hbot }.asIdeal ≠ ⊥

tactic: refine' ⟨fun x => (isClosed_singleton_iff_isMaximal x).2 _⟩
state_before: case refine'_2
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
h : IsField R
⊢ T1Space (PrimeSpectrum R)

tactic: by_cases hx : x.asIdeal = ⊥
state_before: case refine'_2
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
⊢ Ideal.IsMaximal x.asIdeal

tactic: letI := h.toField
state_before: case pos
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : x.asIdeal = ⊥
⊢ Ideal.IsMaximal x.asIdeal

tactic: exact hx.symm ▸ Ideal.bot_isMaximal
state_before: case pos
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : x.asIdeal = ⊥
this : Field R := IsField.toField h
⊢ Ideal.IsMaximal x.asIdeal

tactic: exact absurd h (Ring.not_isField_iff_exists_prime.2 ⟨x.asIdeal, ⟨hx, x.2⟩⟩)
state_before: case neg
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : ¬x.asIdeal = ⊥
⊢ Ideal.IsMaximal x.asIdeal
Theorem: Array.get_push
File: Std/Data/Array/Init/Lemmas.lean

tactic: if h' : i < a.size then
  simp [get_push_lt, h']
else
  simp at h
  simp [get_push_lt, Nat.le_antisymm (Nat.le_of_lt_succ h) (Nat.ge_of_not_lt h')]
state_before: α : Type u_1
a : Array α
x : α
i : Nat
h : i < size (push a x)
⊢ (push a x)[i] = if h : i < size a then a[i] else x

tactic: simp [get_push_lt, h']
state_before: α : Type u_1
a : Array α
x : α
i : Nat
h : i < size (push a x)
h' : i < size a
⊢ (push a x)[i] = if h : i < size a then a[i] else x

tactic: simp at h
state_before: α : Type u_1
a : Array α
x : α
i : Nat
h : i < size (push a x)
h' : ¬i < size a
⊢ (push a x)[i] = if h : i < size a then a[i] else x

tactic: simp [get_push_lt, Nat.le_antisymm (Nat.le_of_lt_succ h) (Nat.ge_of_not_lt h')]
state_before: α : Type u_1
a : Array α
x : α
i : Nat
h✝ : i < size (push a x)
h' : ¬i < size a
h : i < size a + 1
⊢ (push a x)[i] = if h : i < size a then a[i] else x
Theorem: Matrix.inv_inj
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

tactic: refine' left_inv_eq_left_inv (mul_nonsing_inv _ h') _
state_before: l : Type ?u.262717
m : Type u
n : Type u'
α : Type v
inst✝² : Fintype n
inst✝¹ : DecidableEq n
inst✝ : CommRing α
A B C : Matrix n n α
h : A⁻¹ = B⁻¹
h' : IsUnit (det A)
⊢ A = B

tactic: rw [h]
state_before: l : Type ?u.262717
m : Type u
n : Type u'
α : Type v
inst✝² : Fintype n
inst✝¹ : DecidableEq n
inst✝ : CommRing α
A B C : Matrix n n α
h : A⁻¹ = B⁻¹
h' : IsUnit (det A)
⊢ B ⬝ A⁻¹ = 1

tactic: refine' mul_nonsing_inv _ _
state_before: l : Type ?u.262717
m : Type u
n : Type u'
α : Type v
inst✝² : Fintype n
inst✝¹ : DecidableEq n
inst✝ : CommRing α
A B C : Matrix n n α
h : A⁻¹ = B⁻¹
h' : IsUnit (det A)
⊢ B ⬝ B⁻¹ = 1

tactic: rwa [← isUnit_nonsing_inv_det_iff, ← h, isUnit_nonsing_inv_det_iff]
state_before: l : Type ?u.262717
m : Type u
n : Type u'
α : Type v
inst✝² : Fintype n
inst✝¹ : DecidableEq n
inst✝ : CommRing α
A B C : Matrix n n α
h : A⁻¹ = B⁻¹
h' : IsUnit (det A)
⊢ IsUnit (det B)
Theorem: SignType.nonneg_iff
File: Mathlib/Data/Sign.lean

tactic: cases a <;> decide
state_before: a : SignType
⊢ 0 ≤ a ↔ a = 0 ∨ a = 1
Theorem: Int.dist_eq'
File: Mathlib/Topology/Instances/Int.lean

tactic: rw [dist_eq]
state_before: m n : ℤ
⊢ dist m n = ↑(abs (m - n))

tactic: norm_cast
state_before: m n : ℤ
⊢ abs (↑m - ↑n) = ↑(abs (m - n))
Theorem: Disjoint.map
File: Mathlib/Order/Hom/Lattice.lean

tactic: rw [disjoint_iff, ← map_inf, h.eq_bot, map_bot]
state_before: F : Type u_3
ι : Type ?u.26542
α : Type u_1
β : Type u_2
γ : Type ?u.26551
δ : Type ?u.26554
inst✝⁴ : Lattice α
inst✝³ : BoundedOrder α
inst✝² : Lattice β
inst✝¹ : BoundedOrder β
inst✝ : BoundedLatticeHomClass F α β
f : F
a b : α
h : Disjoint a b
⊢ Disjoint (↑f a) (↑f b)
Theorem: Nat.add_mod_add_ite
File: Mathlib/Data/Nat/ModEq.lean

tactic: simp [hc0, Nat.mod_zero]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : c = 0
⊢ ((a + b) % c + if c ≤ a % c + b % c then c else 0) = a % c + b % c

tactic: rw [this]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : ¬c = 0
⊢ ((a + b) % c + if c ≤ a % c + b % c then c else 0) = a % c + b % c

tactic: split_ifs with h
state_before: m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : ¬c = 0
⊢ ((a % c + b % c) % c + if c ≤ a % c + b % c then c else 0) = a % c + b % c

tactic: have h2 : (a % c + b % c) / c < 2 :=
  Nat.div_lt_of_lt_mul
    (by
      rw [mul_two]
      exact
        add_lt_add (Nat.mod_lt _ (Nat.pos_of_ne_zero hc0))
          (Nat.mod_lt _ (Nat.pos_of_ne_zero hc0)))
state_before: case inl
m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : ¬c = 0
h : c ≤ a % c + b % c
⊢ (a % c + b % c) % c + c = a % c + b % c

tactic: have h0 : 0 < (a % c + b % c) / c := Nat.div_pos h (Nat.pos_of_ne_zero hc0)
state_before: case inl
m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : ¬c = 0
h : c ≤ a % c + b % c
h2 : (a % c + b % c) / c < 2
⊢ (a % c + b % c) % c + c = a % c + b % c

tactic: rw [← @add_right_cancel_iff _ _ _ (c * ((a % c + b % c) / c)), add_comm _ c, add_assoc,
  mod_add_div, le_antisymm (le_of_lt_succ h2) h0, mul_one, add_comm]
state_before: case inl
m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : ¬c = 0
h : c ≤ a % c + b % c
h2 : (a % c + b % c) / c < 2
h0 : 0 < (a % c + b % c) / c
⊢ (a % c + b % c) % c + c = a % c + b % c

tactic: rw [mul_two]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : ¬c = 0
h : c ≤ a % c + b % c
⊢ a % c + b % c < c * 2

tactic: exact
  add_lt_add (Nat.mod_lt _ (Nat.pos_of_ne_zero hc0))
    (Nat.mod_lt _ (Nat.pos_of_ne_zero hc0))
state_before: m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : ¬c = 0
h : c ≤ a % c + b % c
⊢ a % c + b % c < c + c

tactic: rw [Nat.mod_eq_of_lt (lt_of_not_ge h), add_zero]
state_before: case inr
m n a✝ b✝ c✝ d a b c : ℕ
this : (a + b) % c = (a % c + b % c) % c
hc0 : ¬c = 0
h : ¬c ≤ a % c + b % c
⊢ (a % c + b % c) % c + 0 = a % c + b % c