1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: List.findIdx?_succ
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: induction xs generalizing i with simp
| cons _ _ _ => split <;> simp_all
state_before: α : Type u_1
xs : List α
p : α → Bool
i : Nat
⊢ findIdx? p xs (i + 1) = Option.map (fun i => i + 1) (findIdx? p xs i)
state_after: no goals

tactic: split <;> simp_all
state_before: case cons
α : Type u_1
p : α → Bool
head✝ : α
tail✝ : List α
tail_ih✝ : ∀ {i : Nat}, findIdx? p tail✝ (i + 1) = Option.map (fun i => i + 1) (findIdx? p tail✝ i)
i : Nat
⊢ (if p head✝ = true then some (i + 1) else findIdx? p tail✝ (i + 1 + 1)) =
    Option.map (fun i => i + 1) (if p head✝ = true then some i else findIdx? p tail✝ (i + 1))
state_after: no goals
Theorem: Real.IsConjExponent.inv_add_inv_conj_ennreal
File: Mathlib/Data/Real/ConjExponents.lean

tactic: rw [← ENNReal.ofReal_one, ← ENNReal.ofReal_inv_of_pos h.pos,
  ← ENNReal.ofReal_inv_of_pos h.symm.pos, ← ENNReal.ofReal_add h.inv_nonneg h.symm.inv_nonneg,
  h.inv_add_inv_conj]
state_before: a b p q : ℝ
h : p.IsConjExponent q
⊢ (ENNReal.ofReal p)⁻¹ + (ENNReal.ofReal q)⁻¹ = 1
state_after: no goals
Theorem: AlternatingMap.zero_compLinearMap
File: Mathlib/LinearAlgebra/Alternating/Basic.lean

tactic: ext
state_before: R : Type u_1
inst✝¹⁴ : Semiring R
M : Type u_2
inst✝¹³ : AddCommMonoid M
inst✝¹² : Module R M
N : Type u_3
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : Module R N
P : Type u_4
inst✝⁹ : AddCommMonoid P
inst✝⁸ : Module R P
M' : Type u_5
inst✝⁷ : AddCommGroup M'
inst✝⁶ : Module R M'
N' : Type u_6
inst✝⁵ : AddCommGroup N'
inst✝⁴ : Module R N'
ι : Type u_7
ι' : Type u_8
ι'' : Type u_9
M₂ : Type u_10
inst✝³ : AddCommMonoid M₂
inst✝² : Module R M₂
M₃ : Type u_11
inst✝¹ : AddCommMonoid M₃
inst✝ : Module R M₃
g : M₂ →ₗ[R] M
⊢ compLinearMap 0 g = 0
state_after: case H
R : Type u_1
inst✝¹⁴ : Semiring R
M : Type u_2
inst✝¹³ : AddCommMonoid M
inst✝¹² : Module R M
N : Type u_3
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : Module R N
P : Type u_4
inst✝⁹ : AddCommMonoid P
inst✝⁸ : Module R P
M' : Type u_5
inst✝⁷ : AddCommGroup M'
inst✝⁶ : Module R M'
N' : Type u_6
inst✝⁵ : AddCommGroup N'
inst✝⁴ : Module R N'
ι : Type u_7
ι' : Type u_8
ι'' : Type u_9
M₂ : Type u_10
inst✝³ : AddCommMonoid M₂
inst✝² : Module R M₂
M₃ : Type u_11
inst✝¹ : AddCommMonoid M₃
inst✝ : Module R M₃
g : M₂ →ₗ[R] M
x✝ : ι → M₂
⊢ (compLinearMap 0 g) x✝ = 0 x✝

tactic: simp only [compLinearMap_apply, zero_apply]
state_before: case H
R : Type u_1
inst✝¹⁴ : Semiring R
M : Type u_2
inst✝¹³ : AddCommMonoid M
inst✝¹² : Module R M
N : Type u_3
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : Module R N
P : Type u_4
inst✝⁹ : AddCommMonoid P
inst✝⁸ : Module R P
M' : Type u_5
inst✝⁷ : AddCommGroup M'
inst✝⁶ : Module R M'
N' : Type u_6
inst✝⁵ : AddCommGroup N'
inst✝⁴ : Module R N'
ι : Type u_7
ι' : Type u_8
ι'' : Type u_9
M₂ : Type u_10
inst✝³ : AddCommMonoid M₂
inst✝² : Module R M₂
M₃ : Type u_11
inst✝¹ : AddCommMonoid M₃
inst✝ : Module R M₃
g : M₂ →ₗ[R] M
x✝ : ι → M₂
⊢ (compLinearMap 0 g) x✝ = 0 x✝
state_after: no goals
Theorem: cube_of_not_dvd
File: Mathlib/NumberTheory/FLT/Three.lean

tactic: apply cube_of_castHom_ne_zero
state_before: n : ℤ
h : ¬3 ∣ n
⊢ ↑n ^ 3 = 1 ∨ ↑n ^ 3 = 8
state_after: case a
n : ℤ
h : ¬3 ∣ n
⊢ (castHom ⋯ (ZMod 3)) ↑n ≠ 0

tactic: rwa [map_intCast, Ne, ZMod.intCast_zmod_eq_zero_iff_dvd]
state_before: case a
n : ℤ
h : ¬3 ∣ n
⊢ (castHom ⋯ (ZMod 3)) ↑n ≠ 0
state_after: no goals
Theorem: MeasureTheory.extend_union
File: Mathlib/MeasureTheory/OuterMeasure/Induced.lean

tactic: rw [union_eq_iUnion,
  extend_iUnion P0 m0 PU mU (pairwise_disjoint_on_bool.2 hd) (Bool.forall_bool.2 ⟨h₂, h₁⟩),
  tsum_fintype]
state_before: α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), Pairwise (Disjoint on f) → m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) ⋯ ≤ ∑' (i : ℕ), m (f i) ⋯
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
hd : Disjoint s₁ s₂
h₁ : P s₁
h₂ : P s₂
⊢ extend m (s₁ ∪ s₂) = extend m s₁ + extend m s₂
state_after: α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), Pairwise (Disjoint on f) → m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) ⋯ ≤ ∑' (i : ℕ), m (f i) ⋯
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
hd : Disjoint s₁ s₂
h₁ : P s₁
h₂ : P s₂
⊢ ∑ b : Bool, extend m (bif b then s₁ else s₂) = extend m s₁ + extend m s₂

tactic: simp
state_before: α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), Pairwise (Disjoint on f) → m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) ⋯ ≤ ∑' (i : ℕ), m (f i) ⋯
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
hd : Disjoint s₁ s₂
h₁ : P s₁
h₂ : P s₂
⊢ ∑ b : Bool, extend m (bif b then s₁ else s₂) = extend m s₁ + extend m s₂
state_after: no goals
Theorem: Cycle.mem_lists_iff_coe_eq
File: Mathlib/Data/List/Cycle.lean

tactic: rw [lists, Quotient.liftOn'_mk'']
state_before: α : Type u_1
s : Cycle α
l✝ l : List α
⊢ l✝ ∈ lists (Quotient.mk'' l) ↔ ↑l✝ = Quotient.mk'' l
state_after: α : Type u_1
s : Cycle α
l✝ l : List α
⊢ l✝ ∈ ↑l.cyclicPermutations ↔ ↑l✝ = Quotient.mk'' l

tactic: simp
state_before: α : Type u_1
s : Cycle α
l✝ l : List α
⊢ l✝ ∈ ↑l.cyclicPermutations ↔ ↑l✝ = Quotient.mk'' l
state_after: no goals
Theorem: Matrix.circulant_single_one
File: Mathlib/LinearAlgebra/Matrix/Circulant.lean

tactic: ext i j
state_before: α✝ : Type u_1
β : Type u_2
m : Type u_3
n✝ : Type u_4
R : Type u_5
α : Type u_6
n : Type u_7
inst✝³ : Zero α
inst✝² : One α
inst✝¹ : DecidableEq n
inst✝ : AddGroup n
⊢ circulant (Pi.single 0 1) = 1
state_after: case a
α✝ : Type u_1
β : Type u_2
m : Type u_3
n✝ : Type u_4
R : Type u_5
α : Type u_6
n : Type u_7
inst✝³ : Zero α
inst✝² : One α
inst✝¹ : DecidableEq n
inst✝ : AddGroup n
i j : n
⊢ circulant (Pi.single 0 1) i j = 1 i j

tactic: simp [one_apply, Pi.single_apply, sub_eq_zero]
state_before: case a
α✝ : Type u_1
β : Type u_2
m : Type u_3
n✝ : Type u_4
R : Type u_5
α : Type u_6
n : Type u_7
inst✝³ : Zero α
inst✝² : One α
inst✝¹ : DecidableEq n
inst✝ : AddGroup n
i j : n
⊢ circulant (Pi.single 0 1) i j = 1 i j
state_after: no goals
Theorem: CategoryTheory.ShortComplex.homologyMap'_nullHomotopic
File: Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean

tactic: apply leftHomologyMap'_nullHomotopic
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
H₁ : S₁.HomologyData
H₂ : S₂.HomologyData
h₀ : S₁.X₁ ⟶ S₂.X₁
h₀_f : h₀ ≫ S₂.f = 0
h₁ : S₁.X₂ ⟶ S₂.X₁
h₂ : S₁.X₃ ⟶ S₂.X₂
h₃ : S₁.X₃ ⟶ S₂.X₃
g_h₃ : S₁.g ≫ h₃ = 0
⊢ homologyMap' (S₁.nullHomotopic S₂ h₀ h₀_f h₁ h₂ h₃ g_h₃) H₁ H₂ = 0
state_after: no goals
Theorem: hasStrictDerivAt_exp_smul_const_of_mem_ball'
File: Mathlib/Analysis/SpecialFunctions/Exponential.lean

tactic: simpa using (hasStrictFDerivAt_exp_smul_const_of_mem_ball' 𝕂 x t htx).hasStrictDerivAt
state_before: 𝕂 : Type u_1
𝕊 : Type u_2
𝔸 : Type u_3
inst✝⁹ : NontriviallyNormedField 𝕂
inst✝⁸ : CharZero 𝕂
inst✝⁷ : NormedCommRing 𝕊
inst✝⁶ : NormedRing 𝔸
inst✝⁵ : NormedSpace 𝕂 𝕊
inst✝⁴ : NormedAlgebra 𝕂 𝔸
inst✝³ : Algebra 𝕊 𝔸
inst✝² : ContinuousSMul 𝕊 𝔸
inst✝¹ : IsScalarTower 𝕂 𝕊 𝔸
inst✝ : CompleteSpace 𝔸
x : 𝔸
t : 𝕂
htx : t • x ∈ EMetric.ball 0 (expSeries 𝕂 𝔸).radius
⊢ HasStrictDerivAt (fun u => exp 𝕂 (u • x)) (x * exp 𝕂 (t • x)) t
state_after: no goals
Theorem: Profinite.NobelingProof.union_C0C1_eq
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

tactic: ext x
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
⊢ C0 C ho ∪ C1 C ho = C
state_after: case h
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
x : I → Bool
⊢ x ∈ C0 C ho ∪ C1 C ho ↔ x ∈ C

tactic: simp only [C0, C1, Set.mem_union, Set.mem_inter_iff, Set.mem_setOf_eq,
  ← and_or_left, and_iff_left_iff_imp, Bool.dichotomy (x (term I ho)), implies_true]
state_before: case h
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
x : I → Bool
⊢ x ∈ C0 C ho ∪ C1 C ho ↔ x ∈ C
state_after: no goals
Theorem: Unitization.norm_inr
File: Mathlib/Analysis/NormedSpace/Unitization.lean

tactic: simp [norm_eq_sup]
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : NonUnitalNormedRing A
inst✝³ : NormedSpace 𝕜 A
inst✝² : IsScalarTower 𝕜 A A
inst✝¹ : SMulCommClass 𝕜 A A
inst✝ : RegularNormedAlgebra 𝕜 A
a : A
⊢ ‖↑a‖ = ‖a‖
state_after: no goals
Theorem: MeasureTheory.IsSetSemiring.sUnion_union_diffFinset₀_of_subset
File: Mathlib/MeasureTheory/SetSemiring.lean

tactic: conv_rhs => rw [← sUnion_union_sUnion_diffFinset₀_of_subset hC hs hI hI_ss]
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
hC : IsSetSemiring C
hs : s ∈ C
hI : ↑I ⊆ C
hI_ss : ∀ t ∈ I, t ⊆ s
inst✝ : DecidableEq (Set α)
⊢ ⋃₀ ↑(I ∪ hC.diffFinset₀ hs hI) = s
state_after: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
hC : IsSetSemiring C
hs : s ∈ C
hI : ↑I ⊆ C
hI_ss : ∀ t ∈ I, t ⊆ s
inst✝ : DecidableEq (Set α)
⊢ ⋃₀ ↑(I ∪ hC.diffFinset₀ hs hI) = ⋃₀ ↑I ∪ ⋃₀ ↑(hC.diffFinset₀ hs hI)

tactic: simp_rw [coe_union]
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
hC : IsSetSemiring C
hs : s ∈ C
hI : ↑I ⊆ C
hI_ss : ∀ t ∈ I, t ⊆ s
inst✝ : DecidableEq (Set α)
⊢ ⋃₀ ↑(I ∪ hC.diffFinset₀ hs hI) = ⋃₀ ↑I ∪ ⋃₀ ↑(hC.diffFinset₀ hs hI)
state_after: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
hC : IsSetSemiring C
hs : s ∈ C
hI : ↑I ⊆ C
hI_ss : ∀ t ∈ I, t ⊆ s
inst✝ : DecidableEq (Set α)
⊢ ⋃₀ (↑I ∪ ↑(hC.diffFinset₀ hs hI)) = ⋃₀ ↑I ∪ ⋃₀ ↑(hC.diffFinset₀ hs hI)

tactic: rw [sUnion_union]
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
hC : IsSetSemiring C
hs : s ∈ C
hI : ↑I ⊆ C
hI_ss : ∀ t ∈ I, t ⊆ s
inst✝ : DecidableEq (Set α)
⊢ ⋃₀ (↑I ∪ ↑(hC.diffFinset₀ hs hI)) = ⋃₀ ↑I ∪ ⋃₀ ↑(hC.diffFinset₀ hs hI)
state_after: no goals
Theorem: ZMod.isUnit_iff_coprime
File: Mathlib/Data/ZMod/Basic.lean

tactic: refine ⟨fun H ↦ ?_, fun H ↦ (unitOfCoprime m H).isUnit⟩
state_before: m n : ℕ
⊢ IsUnit ↑m ↔ m.Coprime n
state_after: m n : ℕ
H : IsUnit ↑m
⊢ m.Coprime n

tactic: have H' := val_coe_unit_coprime H.unit
state_before: m n : ℕ
H : IsUnit ↑m
⊢ m.Coprime n
state_after: m n : ℕ
H : IsUnit ↑m
H' : (↑H.unit).val.Coprime n
⊢ m.Coprime n

tactic: rw [IsUnit.unit_spec, val_natCast m, Nat.coprime_iff_gcd_eq_one] at H'
state_before: m n : ℕ
H : IsUnit ↑m
H' : (↑H.unit).val.Coprime n
⊢ m.Coprime n
state_after: m n : ℕ
H : IsUnit ↑m
H' : (m % n).gcd n = 1
⊢ m.Coprime n

tactic: rw [Nat.coprime_iff_gcd_eq_one, Nat.gcd_comm, ← H']
state_before: m n : ℕ
H : IsUnit ↑m
H' : (m % n).gcd n = 1
⊢ m.Coprime n
state_after: m n : ℕ
H : IsUnit ↑m
H' : (m % n).gcd n = 1
⊢ n.gcd m = (m % n).gcd n

tactic: exact Nat.gcd_rec n m
state_before: m n : ℕ
H : IsUnit ↑m
H' : (m % n).gcd n = 1
⊢ n.gcd m = (m % n).gcd n
state_after: no goals
Theorem: QuasispectrumRestricts.map_zero
File: Mathlib/Algebra/Algebra/Quasispectrum.lean

tactic: rw [← h.left_inv 0, map_zero (algebraMap R S)]
state_before: R✝ : Type u_1
A✝ : Type u_2
inst✝¹² : CommSemiring R✝
inst✝¹¹ : NonUnitalRing A✝
inst✝¹⁰ : Module R✝ A✝
inst✝⁹ : IsScalarTower R✝ A✝ A✝
inst✝⁸ : SMulCommClass R✝ A✝ A✝
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁷ : Semifield R
inst✝⁶ : Field S
inst✝⁵ : NonUnitalRing A
inst✝⁴ : Module R A
inst✝³ : Module S A
inst✝² : IsScalarTower S A A
inst✝¹ : SMulCommClass S A A
inst✝ : Algebra R S
a : A
f : S → R
h : QuasispectrumRestricts a f
⊢ f 0 = 0
state_after: no goals
Theorem: Polynomial.Monic.ne_zero
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rintro rfl
state_before: R✝ : Type u
S : Type v
a b c d : R✝
n m : ℕ
inst✝² : Semiring R✝
p✝¹ p✝ q : R✝[X]
ι : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : Nontrivial R
p : R[X]
hp : p.Monic
⊢ p ≠ 0
state_after: R✝ : Type u
S : Type v
a b c d : R✝
n m : ℕ
inst✝² : Semiring R✝
p✝ p q : R✝[X]
ι : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : Nontrivial R
hp : Monic 0
⊢ False

tactic: simp [Monic] at hp
state_before: R✝ : Type u
S : Type v
a b c d : R✝
n m : ℕ
inst✝² : Semiring R✝
p✝ p q : R✝[X]
ι : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : Nontrivial R
hp : Monic 0
⊢ False
state_after: no goals
Theorem: CategoryTheory.Sieve.image_mem_functorPushforward
File: Mathlib/CategoryTheory/Sites/Sieves.lean

tactic: simp
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : Y ⟶ X
S R✝ : Sieve X
E : Type u₃
inst✝ : Category.{v₃, u₃} E
G : D ⥤ E
R : Sieve X
V : C
f : V ⟶ X
h : R.arrows f
⊢ F.map f = 𝟙 (F.obj V) ≫ F.map f
state_after: no goals
Theorem: Real.Angle.expMapCircle_neg
File: Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean

tactic: induction θ using Real.Angle.induction_on
state_before: θ : Angle
⊢ (-θ).expMapCircle = θ.expMapCircle⁻¹
state_after: case h
x✝ : ℝ
⊢ (-↑x✝).expMapCircle = (↑x✝).expMapCircle⁻¹

tactic: simp_rw [← Real.Angle.coe_neg, Real.Angle.expMapCircle_coe, _root_.expMapCircle_neg]
state_before: case h
x✝ : ℝ
⊢ (-↑x✝).expMapCircle = (↑x✝).expMapCircle⁻¹
state_after: no goals
Theorem: Rat.MulRingNorm.exists_pos_mulRingNorm_eq_pow_neg
File: Mathlib/NumberTheory/Ostrowski.lean

tactic: have pprime := is_prime_of_minimal_nat_zero_lt_mulRingNorm_lt_one hp0 hp1 hmin
state_before: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
⊢ ∃ t, 0 < t ∧ f ↑p = ↑p ^ (-t)
state_after: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
pprime : Nat.Prime p
⊢ ∃ t, 0 < t ∧ f ↑p = ↑p ^ (-t)

tactic: refine ⟨- logb p (f p), Left.neg_pos_iff.2 <| logb_neg (mod_cast pprime.one_lt) hp0 hp1, ?_⟩
state_before: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
pprime : Nat.Prime p
⊢ ∃ t, 0 < t ∧ f ↑p = ↑p ^ (-t)
state_after: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
pprime : Nat.Prime p
⊢ f ↑p = ↑p ^ (- -logb (↑p) (f ↑p))

tactic: rw [neg_neg]
state_before: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
pprime : Nat.Prime p
⊢ f ↑p = ↑p ^ (- -logb (↑p) (f ↑p))
state_after: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
pprime : Nat.Prime p
⊢ f ↑p = ↑p ^ logb (↑p) (f ↑p)

tactic: refine (rpow_logb (mod_cast pprime.pos) ?_ hp0).symm
state_before: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
pprime : Nat.Prime p
⊢ f ↑p = ↑p ^ logb (↑p) (f ↑p)
state_after: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
pprime : Nat.Prime p
⊢ ↑p ≠ 1

tactic: simp only [ne_eq, Nat.cast_eq_one,Nat.Prime.ne_one pprime, not_false_eq_true]
state_before: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
p : ℕ
hp0 : 0 < f ↑p
hp1 : f ↑p < 1
hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
pprime : Nat.Prime p
⊢ ↑p ≠ 1
state_after: no goals
Theorem: List.map_rotate
File: Mathlib/Data/List/Rotate.lean

tactic: induction' n with n hn IH generalizing l
state_before: α : Type u
β : Type u_1
f : α → β
l : List α
n : ℕ
⊢ map f (l.rotate n) = (map f l).rotate n
state_after: case zero
α : Type u
β : Type u_1
f : α → β
l : List α
⊢ map f (l.rotate 0) = (map f l).rotate 0

case succ
α : Type u
β : Type u_1
f : α → β
n : ℕ
hn : ∀ (l : List α), map f (l.rotate n) = (map f l).rotate n
l : List α
⊢ map f (l.rotate (n + 1)) = (map f l).rotate (n + 1)

tactic: simp
state_before: case zero
α : Type u
β : Type u_1
f : α → β
l : List α
⊢ map f (l.rotate 0) = (map f l).rotate 0
state_after: no goals

tactic: cases' l with hd tl
state_before: case succ
α : Type u
β : Type u_1
f : α → β
n : ℕ
hn : ∀ (l : List α), map f (l.rotate n) = (map f l).rotate n
l : List α
⊢ map f (l.rotate (n + 1)) = (map f l).rotate (n + 1)
state_after: case succ.nil
α : Type u
β : Type u_1
f : α → β
n : ℕ
hn : ∀ (l : List α), map f (l.rotate n) = (map f l).rotate n
⊢ map f ([].rotate (n + 1)) = (map f []).rotate (n + 1)

case succ.cons
α : Type u
β : Type u_1
f : α → β
n : ℕ
hn : ∀ (l : List α), map f (l.rotate n) = (map f l).rotate n
hd : α
tl : List α
⊢ map f ((hd :: tl).rotate (n + 1)) = (map f (hd :: tl)).rotate (n + 1)

tactic: simp
state_before: case succ.nil
α : Type u
β : Type u_1
f : α → β
n : ℕ
hn : ∀ (l : List α), map f (l.rotate n) = (map f l).rotate n
⊢ map f ([].rotate (n + 1)) = (map f []).rotate (n + 1)
state_after: no goals

tactic: simp [hn]
state_before: case succ.cons
α : Type u
β : Type u_1
f : α → β
n : ℕ
hn : ∀ (l : List α), map f (l.rotate n) = (map f l).rotate n
hd : α
tl : List α
⊢ map f ((hd :: tl).rotate (n + 1)) = (map f (hd :: tl)).rotate (n + 1)
state_after: no goals
Theorem: Nat.unpair_pair
File: Mathlib/Data/Nat/Pairing.lean

tactic: dsimp only [pair]
state_before: a b : ℕ
⊢ unpair (pair a b) = (a, b)
state_after: a b : ℕ
⊢ unpair (if a < b then b * b + a else a * a + a + b) = (a, b)

tactic: split_ifs with h
state_before: a b : ℕ
⊢ unpair (if a < b then b * b + a else a * a + a + b) = (a, b)
state_after: case pos
a b : ℕ
h : a < b
⊢ unpair (b * b + a) = (a, b)

case neg
a b : ℕ
h : ¬a < b
⊢ unpair (a * a + a + b) = (a, b)

tactic: have be : sqrt (b * b + a) = b := sqrt_add_eq _ (le_trans (le_of_lt h) (Nat.le_add_left _ _))
state_before: case pos
a b : ℕ
h : a < b
⊢ unpair (b * b + a) = (a, b)
state_after: case pos
a b : ℕ
h : a < b
be : (b * b + a).sqrt = b
⊢ unpair (b * b + a) = (a, b)

tactic: simp [unpair, be, Nat.add_sub_cancel_left, h]
state_before: case pos
a b : ℕ
h : a < b
be : (b * b + a).sqrt = b
⊢ unpair (b * b + a) = (a, b)
state_after: no goals

tactic: have ae : sqrt (a * a + (a + b)) = a := by
  rw [sqrt_add_eq]
  exact Nat.add_le_add_left (le_of_not_gt h) _
state_before: case neg
a b : ℕ
h : ¬a < b
⊢ unpair (a * a + a + b) = (a, b)
state_after: case neg
a b : ℕ
h : ¬a < b
ae : (a * a + (a + b)).sqrt = a
⊢ unpair (a * a + a + b) = (a, b)

tactic: simp [unpair, ae, Nat.not_lt_zero, Nat.add_assoc, Nat.add_sub_cancel_left]
state_before: case neg
a b : ℕ
h : ¬a < b
ae : (a * a + (a + b)).sqrt = a
⊢ unpair (a * a + a + b) = (a, b)
state_after: no goals

tactic: rw [sqrt_add_eq]
state_before: a b : ℕ
h : ¬a < b
⊢ (a * a + (a + b)).sqrt = a
state_after: case h
a b : ℕ
h : ¬a < b
⊢ a + b ≤ a + a

tactic: exact Nat.add_le_add_left (le_of_not_gt h) _
state_before: case h
a b : ℕ
h : ¬a < b
⊢ a + b ≤ a + a
state_after: no goals
Theorem: Nat.le_nth_of_lt_nth_succ
File: Mathlib/Data/Nat/Nth.lean

tactic: cases' (setOf p).finite_or_infinite with hf hf
state_before: p : ℕ → Prop
k a : ℕ
h : a < nth p (k + 1)
ha : p a
⊢ a ≤ nth p k
state_after: case inl
p : ℕ → Prop
k a : ℕ
h : a < nth p (k + 1)
ha : p a
hf : (setOf p).Finite
⊢ a ≤ nth p k

case inr
p : ℕ → Prop
k a : ℕ
h : a < nth p (k + 1)
ha : p a
hf : (setOf p).Infinite
⊢ a ≤ nth p k

tactic: rcases exists_lt_card_finite_nth_eq hf ha with ⟨n, hn, rfl⟩
state_before: case inl
p : ℕ → Prop
k a : ℕ
h : a < nth p (k + 1)
ha : p a
hf : (setOf p).Finite
⊢ a ≤ nth p k
state_after: case inl.intro.intro
p : ℕ → Prop
k : ℕ
hf : (setOf p).Finite
n : ℕ
hn : n < hf.toFinset.card
h : nth p n < nth p (k + 1)
ha : p (nth p n)
⊢ nth p n ≤ nth p k

tactic: cases' lt_or_le (k + 1) hf.toFinset.card with hk hk
state_before: case inl.intro.intro
p : ℕ → Prop
k : ℕ
hf : (setOf p).Finite
n : ℕ
hn : n < hf.toFinset.card
h : nth p n < nth p (k + 1)
ha : p (nth p n)
⊢ nth p n ≤ nth p k
state_after: case inl.intro.intro.inl
p : ℕ → Prop
k : ℕ
hf : (setOf p).Finite
n : ℕ
hn : n < hf.toFinset.card
h : nth p n < nth p (k + 1)
ha : p (nth p n)
hk : k + 1 < hf.toFinset.card
⊢ nth p n ≤ nth p k

case inl.intro.intro.inr
p : ℕ → Prop
k : ℕ
hf : (setOf p).Finite
n : ℕ
hn : n < hf.toFinset.card
h : nth p n < nth p (k + 1)
ha : p (nth p n)
hk : hf.toFinset.card ≤ k + 1
⊢ nth p n ≤ nth p k

tactic: rwa [(nth_strictMonoOn hf).lt_iff_lt hn hk, Nat.lt_succ_iff,
  ← (nth_strictMonoOn hf).le_iff_le hn (k.lt_succ_self.trans hk)] at h
state_before: case inl.intro.intro.inl
p : ℕ → Prop
k : ℕ
hf : (setOf p).Finite
n : ℕ
hn : n < hf.toFinset.card
h : nth p n < nth p (k + 1)
ha : p (nth p n)
hk : k + 1 < hf.toFinset.card
⊢ nth p n ≤ nth p k
state_after: no goals

tactic: rw [nth_of_card_le _ hk] at h
state_before: case inl.intro.intro.inr
p : ℕ → Prop
k : ℕ
hf : (setOf p).Finite
n : ℕ
hn : n < hf.toFinset.card
h : nth p n < nth p (k + 1)
ha : p (nth p n)
hk : hf.toFinset.card ≤ k + 1
⊢ nth p n ≤ nth p k
state_after: case inl.intro.intro.inr
p : ℕ → Prop
k : ℕ
hf : (setOf p).Finite
n : ℕ
hn : n < hf.toFinset.card
h : nth p n < 0
ha : p (nth p n)
hk : hf.toFinset.card ≤ k + 1
⊢ nth p n ≤ nth p k

tactic: exact absurd h (zero_le _).not_lt
state_before: case inl.intro.intro.inr
p : ℕ → Prop
k : ℕ
hf : (setOf p).Finite
n : ℕ
hn : n < hf.toFinset.card
h : nth p n < 0
ha : p (nth p n)
hk : hf.toFinset.card ≤ k + 1
⊢ nth p n ≤ nth p k
state_after: no goals

tactic: rcases subset_range_nth ha with ⟨n, rfl⟩
state_before: case inr
p : ℕ → Prop
k a : ℕ
h : a < nth p (k + 1)
ha : p a
hf : (setOf p).Infinite
⊢ a ≤ nth p k
state_after: case inr.intro
p : ℕ → Prop
k : ℕ
hf : (setOf p).Infinite
n : ℕ
h : nth p n < nth p (k + 1)
ha : p (nth p n)
⊢ nth p n ≤ nth p k

tactic: rwa [nth_lt_nth hf, Nat.lt_succ_iff, ← nth_le_nth hf] at h
state_before: case inr.intro
p : ℕ → Prop
k : ℕ
hf : (setOf p).Infinite
n : ℕ
h : nth p n < nth p (k + 1)
ha : p (nth p n)
⊢ nth p n ≤ nth p k
state_after: no goals