tasksource/leandojo huggingface dataset:
Theorem: GeneralizedContinuedFraction.IntFractPair.stream_eq_none_of_fr_eq_zero
File: Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean

tactic: cases' ifp_n with _ fr
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
ifp_n : IntFractPair K
stream_nth_eq : IntFractPair.stream v n = some ifp_n
nth_fr_eq_zero : ifp_n.fr = 0
⊢ IntFractPair.stream v (n + 1) = none

tactic: change fr = 0 at nth_fr_eq_zero
state_before: case mk
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
b✝ : ℤ
fr : K
stream_nth_eq : IntFractPair.stream v n = some { b := b✝, fr := fr }
nth_fr_eq_zero : { b := b✝, fr := fr }.fr = 0
⊢ IntFractPair.stream v (n + 1) = none

tactic: simp [IntFractPair.stream, stream_nth_eq, nth_fr_eq_zero]
state_before: case mk
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
b✝ : ℤ
fr : K
stream_nth_eq : IntFractPair.stream v n = some { b := b✝, fr := fr }
nth_fr_eq_zero : fr = 0
⊢ IntFractPair.stream v (n + 1) = none
Theorem: IsSMulRegular.pow_iff
File: Mathlib/Algebra/Regular/SMul.lean

tactic: refine' ⟨_, pow n⟩
state_before: R : Type u_1
S : Type ?u.17315
M : Type u_2
a b : R
s : S
inst✝¹ : Monoid R
inst✝ : MulAction R M
n : ℕ
n0 : 0 < n
⊢ IsSMulRegular M (a ^ n) ↔ IsSMulRegular M a

tactic: rw [← Nat.succ_pred_eq_of_pos n0, pow_succ', ← smul_eq_mul]
state_before: R : Type u_1
S : Type ?u.17315
M : Type u_2
a b : R
s : S
inst✝¹ : Monoid R
inst✝ : MulAction R M
n : ℕ
n0 : 0 < n
⊢ IsSMulRegular M (a ^ n) → IsSMulRegular M a

tactic: exact of_smul _
state_before: R : Type u_1
S : Type ?u.17315
M : Type u_2
a b : R
s : S
inst✝¹ : Monoid R
inst✝ : MulAction R M
n : ℕ
n0 : 0 < n
⊢ IsSMulRegular M (a ^ Nat.pred n • a) → IsSMulRegular M a
Theorem: Behrend.exists_large_sphere_aux
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: refine' exists_le_card_fiber_of_nsmul_le_card_of_maps_to (fun x hx => _) nonempty_range_succ _
state_before: α : Type ?u.566246
β : Type ?u.566249
n✝ d✝ k N : ℕ
x : Fin n✝ → ℕ
n d : ℕ
⊢ ∃ k, k ∈ range (n * (d - 1) ^ 2 + 1) ∧ ↑(d ^ n) / (↑(n * (d - 1) ^ 2) + 1) ≤ ↑(card (sphere n d k))

tactic: rw [mem_range, lt_succ_iff]
state_before: case refine'_1
α : Type ?u.566246
β : Type ?u.566249
n✝ d✝ k N : ℕ
x✝ : Fin n✝ → ℕ
n d : ℕ
x : Fin n → ℕ
hx : x ∈ box n d
⊢ ∑ i : Fin n, x i ^ 2 ∈ range (n * (d - 1) ^ 2 + 1)

tactic: exact sum_sq_le_of_mem_box hx
state_before: case refine'_1
α : Type ?u.566246
β : Type ?u.566249
n✝ d✝ k N : ℕ
x✝ : Fin n✝ → ℕ
n d : ℕ
x : Fin n → ℕ
hx : x ∈ box n d
⊢ ∑ i : Fin n, x i ^ 2 ≤ n * (d - 1) ^ 2

tactic: rw [card_range, _root_.nsmul_eq_mul, mul_div_assoc', cast_add_one, mul_div_cancel_left,
  card_box]
state_before: case refine'_2
α : Type ?u.566246
β : Type ?u.566249
n✝ d✝ k N : ℕ
x : Fin n✝ → ℕ
n d : ℕ
⊢ card (range (n * (d - 1) ^ 2 + 1)) • (↑(d ^ n) / (↑(n * (d - 1) ^ 2) + 1)) ≤ ↑(card (box n d))

tactic: exact (cast_add_one_pos _).ne'
state_before: case refine'_2.ha
α : Type ?u.566246
β : Type ?u.566249
n✝ d✝ k N : ℕ
x : Fin n✝ → ℕ
n d : ℕ
⊢ ↑(n * (d - 1) ^ 2) + 1 ≠ 0
Theorem: MvPowerSeries.coeff_zero_X
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [coeff_X, if_neg]
state_before: σ : Type u_2
R : Type u_1
inst✝ : Semiring R
s : σ
⊢ ↑(coeff R 0) (X s) = 0

tactic: intro h
state_before: case hnc
σ : Type u_2
R : Type u_1
inst✝ : Semiring R
s : σ
⊢ ¬0 = single s 1

tactic: exact one_ne_zero (single_eq_zero.mp h.symm)
state_before: case hnc
σ : Type u_2
R : Type u_1
inst✝ : Semiring R
s : σ
h : 0 = single s 1
⊢ False
Theorem: Mathlib.Tactic.Abel.zero_term
File: Mathlib/Tactic/Abel.lean

tactic: simp [term, zero_nsmul, one_nsmul]
state_before: α : Type u_1
inst✝ : AddCommMonoid α
x a : α
⊢ term 0 x a = a
Theorem: Finset.lcm_eq_zero_iff
File: Mathlib/Algebra/GCDMonoid/Finset.lean

tactic: simp only [Multiset.mem_map, lcm_def, Multiset.lcm_eq_zero_iff, Set.mem_image, mem_coe, ←
  Finset.mem_def]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.10594
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
inst✝ : Nontrivial α
⊢ lcm s f = 0 ↔ 0 ∈ f '' ↑s
Theorem: EMetric.hausdorffEdist_zero_iff_closure_eq_closure
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp only [hausdorffEdist_def, ENNReal.sup_eq_zero, ENNReal.iSup_eq_zero, ← subset_def,
  ← mem_closure_iff_infEdist_zero, subset_antisymm_iff, isClosed_closure.closure_subset_iff]
state_before: ι : Sort ?u.50354
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ hausdorffEdist s t = 0 ↔ closure s = closure t
Theorem: Set.Finite.toFinset_prod
File: Mathlib/Data/Set/Finite.lean

tactic: simp
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
hs : Set.Finite s
ht : Set.Finite t
⊢ ∀ (a : α × β), a ∈ Finite.toFinset hs ×ˢ Finite.toFinset ht ↔ a ∈ Finite.toFinset (_ : Set.Finite (s ×ˢ t))
Theorem: measurable_ereal_toReal
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean

tactic: simpa using measurable_id
state_before: α : Type ?u.3040955
β : Type ?u.3040958
γ : Type ?u.3040961
γ₂ : Type ?u.3040964
δ : Type ?u.3040967
ι : Sort y
s t u : Set α
inst✝ : MeasurableSpace α
⊢ Measurable fun p => EReal.toReal ↑p
Theorem: lowerSemicontinuousAt_sum
File: Mathlib/Topology/Semicontinuous.lean

tactic: simp_rw [← lowerSemicontinuousWithinAt_univ_iff] at *
state_before: α : Type u_2
inst✝⁵ : TopologicalSpace α
β : Type ?u.107722
inst✝⁴ : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
ι : Type u_1
γ : Type u_3
inst✝³ : LinearOrderedAddCommMonoid γ
inst✝² : TopologicalSpace γ
inst✝¹ : OrderTopology γ
inst✝ : ContinuousAdd γ
f : ι → α → γ
a : Finset ι
ha : ∀ (i : ι), i ∈ a → LowerSemicontinuousAt (f i) x
⊢ LowerSemicontinuousAt (fun z => ∑ i in a, f i z) x

tactic: exact lowerSemicontinuousWithinAt_sum ha
state_before: α : Type u_2
inst✝⁵ : TopologicalSpace α
β : Type ?u.107722
inst✝⁴ : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
ι : Type u_1
γ : Type u_3
inst✝³ : LinearOrderedAddCommMonoid γ
inst✝² : TopologicalSpace γ
inst✝¹ : OrderTopology γ
inst✝ : ContinuousAdd γ
f : ι → α → γ
a : Finset ι
ha : ∀ (i : ι), i ∈ a → LowerSemicontinuousWithinAt (f i) univ x
⊢ LowerSemicontinuousWithinAt (fun z => ∑ i in a, f i z) univ x
Theorem: Finset.image₂_union_inter_subset
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_1
α' : Type ?u.105175
β : Type u_2
β' : Type ?u.105181
γ : Type ?u.105184
γ' : Type ?u.105187
δ : Type ?u.105190
δ' : Type ?u.105193
ε : Type ?u.105196
ε' : Type ?u.105199
ζ : Type ?u.105202
ζ' : Type ?u.105205
ν : Type ?u.105208
inst✝⁹ : DecidableEq α'
inst✝⁸ : DecidableEq β'
inst✝⁷ : DecidableEq γ
inst✝⁶ : DecidableEq γ'
inst✝⁵ : DecidableEq δ
inst✝⁴ : DecidableEq δ'
inst✝³ : DecidableEq ε
inst✝² : DecidableEq ε'
f✝ f' : α → β → γ
g g' : α → β → γ → δ
s✝ s' : Finset α
t✝ t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → α → β
s t : Finset α
hf : ∀ (a b : α), f a b = f b a
⊢ ↑(image₂ f (s ∪ t) (s ∩ t)) ⊆ ↑(image₂ f s t)

tactic: exact image2_union_inter_subset hf
state_before: α : Type u_1
α' : Type ?u.105175
β : Type u_2
β' : Type ?u.105181
γ : Type ?u.105184
γ' : Type ?u.105187
δ : Type ?u.105190
δ' : Type ?u.105193
ε : Type ?u.105196
ε' : Type ?u.105199
ζ : Type ?u.105202
ζ' : Type ?u.105205
ν : Type ?u.105208
inst✝⁹ : DecidableEq α'
inst✝⁸ : DecidableEq β'
inst✝⁷ : DecidableEq γ
inst✝⁶ : DecidableEq γ'
inst✝⁵ : DecidableEq δ
inst✝⁴ : DecidableEq δ'
inst✝³ : DecidableEq ε
inst✝² : DecidableEq ε'
f✝ f' : α → β → γ
g g' : α → β → γ → δ
s✝ s' : Finset α
t✝ t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → α → β
s t : Finset α
hf : ∀ (a b : α), f a b = f b a
⊢ image2 f (↑s ∪ ↑t) (↑s ∩ ↑t) ⊆ image2 f ↑s ↑t
Theorem: Ordinal.mul_omega_opow_opow
File: Mathlib/SetTheory/Ordinal/Principal.lean

tactic: by_cases b0 : b = 0
state_before: a b : Ordinal
a0 : 0 < a
h : a < ω ^ ω ^ b
⊢ a * ω ^ ω ^ b = ω ^ ω ^ b

tactic: refine'
  le_antisymm _
    (by simpa only [one_mul] using mul_le_mul_right' (one_le_iff_pos.2 a0) (omega^omega^b))
state_before: case neg
a b : Ordinal
a0 : 0 < a
h : a < ω ^ ω ^ b
b0 : ¬b = 0
⊢ a * ω ^ ω ^ b = ω ^ ω ^ b

tactic: rcases(lt_opow_of_limit omega_ne_zero (opow_isLimit_left omega_isLimit b0)).1 h with ⟨x, xb, ax⟩
state_before: case neg
a b : Ordinal
a0 : 0 < a
h : a < ω ^ ω ^ b
b0 : ¬b = 0
⊢ a * ω ^ ω ^ b ≤ ω ^ ω ^ b

tactic: apply (mul_le_mul_right' (le_of_lt ax) _).trans
state_before: case neg.intro.intro
a b : Ordinal
a0 : 0 < a
h : a < ω ^ ω ^ b
b0 : ¬b = 0
x : Ordinal
xb : x < ω ^ b
ax : a < ω ^ x
⊢ a * ω ^ ω ^ b ≤ ω ^ ω ^ b

tactic: rw [← opow_add, add_omega_opow xb]
state_before: case neg.intro.intro
a b : Ordinal
a0 : 0 < a
h : a < ω ^ ω ^ b
b0 : ¬b = 0
x : Ordinal
xb : x < ω ^ b
ax : a < ω ^ x
⊢ ω ^ x * ω ^ ω ^ b ≤ ω ^ ω ^ b

tactic: rw [b0, opow_zero, opow_one] at h⊢
state_before: case pos
a b : Ordinal
a0 : 0 < a
h : a < ω ^ ω ^ b
b0 : b = 0
⊢ a * ω ^ ω ^ b = ω ^ ω ^ b

tactic: exact mul_omega a0 h
state_before: case pos
a b : Ordinal
a0 : 0 < a
h : a < ω
b0 : b = 0
⊢ a * ω = ω

tactic: simpa only [one_mul] using mul_le_mul_right' (one_le_iff_pos.2 a0) (omega^omega^b)
state_before: a b : Ordinal
a0 : 0 < a
h : a < ω ^ ω ^ b
b0 : ¬b = 0
⊢ ω ^ ω ^ b ≤ a * ω ^ ω ^ b
Theorem: UniformContinuous.zpow_const
File: Mathlib/Topology/Algebra/UniformGroup.lean

tactic: simp_rw [zpow_ofNat]
state_before: α : Type u_2
β : Type u_1
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f : β → α
hf : UniformContinuous f
n : ℕ
⊢ UniformContinuous fun x => f x ^ ↑n

tactic: exact hf.pow_const _
state_before: α : Type u_2
β : Type u_1
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f : β → α
hf : UniformContinuous f
n : ℕ
⊢ UniformContinuous fun x => f x ^ n

tactic: simp_rw [zpow_negSucc]
state_before: α : Type u_2
β : Type u_1
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f : β → α
hf : UniformContinuous f
n : ℕ
⊢ UniformContinuous fun x => f x ^ Int.negSucc n

tactic: exact (hf.pow_const _).inv
state_before: α : Type u_2
β : Type u_1
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f : β → α
hf : UniformContinuous f
n : ℕ
⊢ UniformContinuous fun x => (f x ^ (n + 1))⁻¹
Theorem: HasStrictFDerivAt.mul_const
File: Mathlib/Analysis/Calculus/FDeriv/Mul.lean

tactic: convert hc.mul_const' d
state_before: 𝕜 : Type u_1
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
F : Type ?u.871792
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
G : Type ?u.871887
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
G' : Type ?u.871982
inst✝⁵ : NormedAddCommGroup G'
inst✝⁴ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
𝔸 : Type ?u.874117
𝔸' : Type u_3
inst✝³ : NormedRing 𝔸
inst✝² : NormedCommRing 𝔸'
inst✝¹ : NormedAlgebra 𝕜 𝔸
inst✝ : NormedAlgebra 𝕜 𝔸'
a b : E → 𝔸
a' b' : E →L[𝕜] 𝔸
c d✝ : E → 𝔸'
c' d' : E →L[𝕜] 𝔸'
hc : HasStrictFDerivAt c c' x
d : 𝔸'
⊢ HasStrictFDerivAt (fun y => c y * d) (d • c') x

tactic: ext z
state_before: case h.e'_10
𝕜 : Type u_1
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
F : Type ?u.871792
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
G : Type ?u.871887
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
G' : Type ?u.871982
inst✝⁵ : NormedAddCommGroup G'
inst✝⁴ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
𝔸 : Type ?u.874117
𝔸' : Type u_3
inst✝³ : NormedRing 𝔸
inst✝² : NormedCommRing 𝔸'
inst✝¹ : NormedAlgebra 𝕜 𝔸
inst✝ : NormedAlgebra 𝕜 𝔸'
a b : E → 𝔸
a' b' : E →L[𝕜] 𝔸
c d✝ : E → 𝔸'
c' d' : E →L[𝕜] 𝔸'
hc : HasStrictFDerivAt c c' x
d : 𝔸'
⊢ d • c' = smulRight c' d

tactic: apply mul_comm
state_before: case h.e'_10.h
𝕜 : Type u_1
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
F : Type ?u.871792
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
G : Type ?u.871887
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
G' : Type ?u.871982
inst✝⁵ : NormedAddCommGroup G'
inst✝⁴ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
𝔸 : Type ?u.874117
𝔸' : Type u_3
inst✝³ : NormedRing 𝔸
inst✝² : NormedCommRing 𝔸'
inst✝¹ : NormedAlgebra 𝕜 𝔸
inst✝ : NormedAlgebra 𝕜 𝔸'
a b : E → 𝔸
a' b' : E →L[𝕜] 𝔸
c d✝ : E → 𝔸'
c' d' : E →L[𝕜] 𝔸'
hc : HasStrictFDerivAt c c' x
d : 𝔸'
z : E
⊢ ↑(d • c') z = ↑(smulRight c' d) z
Theorem: List.Palindrome.map
File: Mathlib/Data/List/Palindrome.lean

tactic: rw [← map_reverse, p.reverse_eq]
state_before: α : Type u_1
β : Type u_2
l : List α
f : α → β
p : Palindrome l
⊢ reverse (map f l) = map f l
Theorem: Padic.valuation_map_add
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: by_cases hx : x = 0
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
⊢ min (valuation x) (valuation y) ≤ valuation (x + y)

tactic: rw [hx, zero_add]
state_before: case pos
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : x = 0
⊢ min (valuation x) (valuation y) ≤ valuation (x + y)

tactic: exact min_le_right _ _
state_before: case pos
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : x = 0
⊢ min (valuation 0) (valuation y) ≤ valuation y

tactic: by_cases hy : y = 0
state_before: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : ¬x = 0
⊢ min (valuation x) (valuation y) ≤ valuation (x + y)

tactic: rw [hy, add_zero]
state_before: case pos
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : ¬x = 0
hy : y = 0
⊢ min (valuation x) (valuation y) ≤ valuation (x + y)

tactic: exact min_le_left _ _
state_before: case pos
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : ¬x = 0
hy : y = 0
⊢ min (valuation x) (valuation 0) ≤ valuation x

tactic: have h_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖ := padicNormE.nonarchimedean x y
state_before: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : ¬x = 0
hy : ¬y = 0
⊢ min (valuation x) (valuation y) ≤ valuation (x + y)

tactic: have hp_one : (1 : ℝ) < p := by
  rw [← Nat.cast_one, Nat.cast_lt]
  exact Nat.Prime.one_lt hp.elim
state_before: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : ¬x = 0
hy : ¬y = 0
h_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖
⊢ min (valuation x) (valuation y) ≤ valuation (x + y)

tactic: rwa [norm_eq_pow_val hx, norm_eq_pow_val hy, norm_eq_pow_val hxy,
  zpow_le_max_iff_min_le hp_one] at h_norm
state_before: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : ¬x = 0
hy : ¬y = 0
h_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖
hp_one : 1 < ↑p
⊢ min (valuation x) (valuation y) ≤ valuation (x + y)

tactic: rw [← Nat.cast_one, Nat.cast_lt]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : ¬x = 0
hy : ¬y = 0
h_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖
⊢ 1 < ↑p

tactic: exact Nat.Prime.one_lt hp.elim
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hxy : x + y ≠ 0
hx : ¬x = 0
hy : ¬y = 0
h_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖
⊢ 1 < p
Theorem: FreeGroup.Red.Step.append_left
File: Mathlib/GroupTheory/FreeGroup.lean

tactic: rw [← List.append_assoc, ← List.append_assoc]
state_before: α : Type u
L L₁ L₂ L₃ L₄ x✝¹ L₁✝ L₂✝ : List (α × Bool)
x✝ : α
b✝ : Bool
⊢ Step (x✝¹ ++ (L₁✝ ++ (x✝, b✝) :: (x✝, !b✝) :: L₂✝)) (x✝¹ ++ (L₁✝ ++ L₂✝))

tactic: constructor
state_before: α : Type u
L L₁ L₂ L₃ L₄ x✝¹ L₁✝ L₂✝ : List (α × Bool)
x✝ : α
b✝ : Bool
⊢ Step (x✝¹ ++ L₁✝ ++ (x✝, b✝) :: (x✝, !b✝) :: L₂✝) (x✝¹ ++ L₁✝ ++ L₂✝)
Theorem: Polynomial.content_dvd_coeff
File: Mathlib/RingTheory/Polynomial/Content.lean

tactic: by_cases h : n ∈ p.support
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
n : ℕ
⊢ content p ∣ coeff p n

tactic: rw [mem_support_iff, Classical.not_not] at h
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
n : ℕ
h : ¬n ∈ support p
⊢ content p ∣ coeff p n

tactic: rw [h]
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
n : ℕ
h : coeff p n = 0
⊢ content p ∣ coeff p n

tactic: apply dvd_zero
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
n : ℕ
h : coeff p n = 0
⊢ content p ∣ 0

tactic: apply Finset.gcd_dvd h
state_before: case pos
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
n : ℕ
h : n ∈ support p
⊢ content p ∣ coeff p n
Theorem: PEquiv.toPEquiv_mul_matrix
File: Mathlib/Data/Matrix/PEquiv.lean

tactic: ext (i j)
state_before: k : Type ?u.14630
l : Type ?u.14633
m : Type u_1
n : Type u_2
α : Type v
inst✝² : Fintype m
inst✝¹ : DecidableEq m
inst✝ : Semiring α
f : m ≃ m
M : Matrix m n α
⊢ toMatrix (Equiv.toPEquiv f) ⬝ M = fun i => M (↑f i)

tactic: rw [mul_matrix_apply, Equiv.toPEquiv_apply]
state_before: case a.h
k : Type ?u.14630
l : Type ?u.14633
m : Type u_1
n : Type u_2
α : Type v
inst✝² : Fintype m
inst✝¹ : DecidableEq m
inst✝ : Semiring α
f : m ≃ m
M : Matrix m n α
i : m
j : n
⊢ (toMatrix (Equiv.toPEquiv f) ⬝ M) i j = M (↑f i) j
Theorem: Basis.sum_toMatrix_smul_self
File: Mathlib/LinearAlgebra/Matrix/Basis.lean

tactic: simp_rw [e.toMatrix_apply, e.sum_repr]
state_before: ι : Type u_1
ι' : Type u_4
κ : Type ?u.260003
κ' : Type ?u.260006
R : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
R₂ : Type ?u.260199
M₂ : Type ?u.260202
inst✝³ : CommRing R₂
inst✝² : AddCommGroup M₂
inst✝¹ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
inst✝ : Fintype ι
⊢ ∑ i : ι, toMatrix e v i j • ↑e i = v j
Theorem: ZMod.coe_int_cast
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n : ℕ
a : ℤ
⊢ ↑↑a = a % ↑n

tactic: rw [Int.ofNat_zero, Int.emod_zero, Int.cast_id]
state_before: case zero
a : ℤ
⊢ ↑↑a = a % ↑Nat.zero

tactic: rfl
state_before: case zero
a : ℤ
⊢ ↑a = a

tactic: rw [← val_int_cast, val]
state_before: case succ
a : ℤ
n✝ : ℕ
⊢ ↑↑a = a % ↑(Nat.succ n✝)

tactic: rfl
state_before: case succ
a : ℤ
n✝ : ℕ
⊢ ↑↑a =
    ↑((match (motive := (x : ℕ) → ZMod x → ℕ) Nat.succ n✝ with
        | 0 => Int.natAbs
        | Nat.succ n => Fin.val)
        ↑a)
Theorem: map_inv_le_iff
File: Mathlib/Order/Hom/Basic.lean

tactic: convert (@map_le_map_iff _ _ _ _ _ _ f (EquivLike.inv f b) a).symm
state_before: F : Type u_2
α : Type u_1
β : Type u_3
γ : Type ?u.27241
δ : Type ?u.27244
inst✝² : LE α
inst✝¹ : LE β
inst✝ : OrderIsoClass F α β
f : F
a : α
b : β
⊢ EquivLike.inv f b ≤ a ↔ b ≤ ↑f a

tactic: exact (EquivLike.right_inv f _).symm
state_before: case h.e'_2.h.e'_3
F : Type u_2
α : Type u_1
β : Type u_3
γ : Type ?u.27241
δ : Type ?u.27244
inst✝² : LE α
inst✝¹ : LE β
inst✝ : OrderIsoClass F α β
f : F
a : α
b : β
⊢ b = ↑f (EquivLike.inv f b)
Theorem: Finset.mem_range_iff_mem_finset_range_of_mod_eq'
File: Mathlib/Data/Finset/Image.lean

tactic: constructor
state_before: α : Type u_1
β : Type ?u.101231
γ : Type ?u.101234
inst✝¹ : DecidableEq β
f✝ g : α → β
s : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : ℕ → α
a : α
n : ℕ
hn : 0 < n
h : ∀ (i : ℕ), f (i % n) = f i
⊢ a ∈ Set.range f ↔ a ∈ image (fun i => f i) (range n)

tactic: rintro ⟨i, hi⟩
state_before: case mp
α : Type u_1
β : Type ?u.101231
γ : Type ?u.101234
inst✝¹ : DecidableEq β
f✝ g : α → β
s : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : ℕ → α
a : α
n : ℕ
hn : 0 < n
h : ∀ (i : ℕ), f (i % n) = f i
⊢ a ∈ Set.range f → a ∈ image (fun i => f i) (range n)

tactic: simp only [mem_image, exists_prop, mem_range]
state_before: case mp.intro
α : Type u_1
β : Type ?u.101231
γ : Type ?u.101234
inst✝¹ : DecidableEq β
f✝ g : α → β
s : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : ℕ → α
a : α
n : ℕ
hn : 0 < n
h : ∀ (i : ℕ), f (i % n) = f i
i : ℕ
hi : f i = a
⊢ a ∈ image (fun i => f i) (range n)

tactic: exact ⟨i % n, Nat.mod_lt i hn, (rfl.congr hi).mp (h i)⟩
state_before: case mp.intro
α : Type u_1
β : Type ?u.101231
γ : Type ?u.101234
inst✝¹ : DecidableEq β
f✝ g : α → β
s : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : ℕ → α
a : α
n : ℕ
hn : 0 < n
h : ∀ (i : ℕ), f (i % n) = f i
i : ℕ
hi : f i = a
⊢ ∃ a_1, a_1 < n ∧ f a_1 = a

tactic: rintro h
state_before: case mpr
α : Type u_1
β : Type ?u.101231
γ : Type ?u.101234
inst✝¹ : DecidableEq β
f✝ g : α → β
s : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : ℕ → α
a : α
n : ℕ
hn : 0 < n
h : ∀ (i : ℕ), f (i % n) = f i
⊢ a ∈ image (fun i => f i) (range n) → a ∈ Set.range f

tactic: simp only [mem_image, exists_prop, Set.mem_range, mem_range] at *
state_before: case mpr
α : Type u_1
β : Type ?u.101231
γ : Type ?u.101234
inst✝¹ : DecidableEq β
f✝ g : α → β
s : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : ℕ → α
a : α
n : ℕ
hn : 0 < n
h✝ : ∀ (i : ℕ), f (i % n) = f i
h : a ∈ image (fun i => f i) (range n)
⊢ a ∈ Set.range f

tactic: rcases h with ⟨i, _, ha⟩
state_before: case mpr
α : Type u_1
β : Type ?u.101231
γ : Type ?u.101234
inst✝¹ : DecidableEq β
f✝ g : α → β
s : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : ℕ → α
a : α
n : ℕ
hn : 0 < n
h✝ : ∀ (i : ℕ), f (i % n) = f i
h : ∃ a_1, a_1 < n ∧ f a_1 = a
⊢ ∃ y, f y = a

tactic: exact ⟨i, ha⟩
state_before: case mpr.intro.intro
α : Type u_1
β : Type ?u.101231
γ : Type ?u.101234
inst✝¹ : DecidableEq β
f✝ g : α → β
s : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : ℕ → α
a : α
n : ℕ
hn : 0 < n
h : ∀ (i : ℕ), f (i % n) = f i
i : ℕ
left✝ : i < n
ha : f i = a
⊢ ∃ y, f y = a
Theorem: Commute.inv_add_inv
File: Mathlib/Algebra/Field/Basic.lean

tactic: rw [inv_eq_one_div, inv_eq_one_div, hab.one_div_add_one_div ha hb]
state_before: α : Type u_1
β : Type ?u.17471
K : Type ?u.17474
inst✝ : DivisionSemiring α
a b c d : α
hab : _root_.Commute a b
ha : a ≠ 0
hb : b ≠ 0
⊢ a⁻¹ + b⁻¹ = (a + b) / (a * b)
Theorem: ultrafilter_extend_extends
File: Mathlib/Topology/StoneCech.lean

tactic: letI : TopologicalSpace α := ⊥
state_before: α : Type u
γ : Type u_1
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space γ
f : α → γ
⊢ Ultrafilter.extend f ∘ pure = f

tactic: haveI : DiscreteTopology α := ⟨rfl⟩
state_before: α : Type u
γ : Type u_1
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space γ
f : α → γ
this : TopologicalSpace α := ⊥
⊢ Ultrafilter.extend f ∘ pure = f

tactic: exact funext (denseInducing_pure.extend_eq continuous_of_discreteTopology)
state_before: α : Type u
γ : Type u_1
inst✝¹ : TopologicalSpace γ
inst✝ : T2Space γ
f : α → γ
this✝ : TopologicalSpace α := ⊥
this : DiscreteTopology α
⊢ Ultrafilter.extend f ∘ pure = f
Theorem: disjoint_nhdsSet_principal
File: Mathlib/Topology/NhdsSet.lean

tactic: rw [disjoint_comm, disjoint_principal_nhdsSet, disjoint_comm]
state_before: α : Type u_1
β : Type ?u.8534
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t s₁ s₂ t₁ t₂ : Set α
x : α
⊢ Disjoint (𝓝ˢ s) (𝓟 t) ↔ Disjoint s (closure t)
Theorem: IsROrC.re_eq_self_of_le
File: Mathlib/Data/IsROrC/Basic.lean

tactic: rw [← conj_eq_iff_re, conj_eq_iff_im, im_eq_zero_of_le h]
state_before: K : Type u_1
E : Type ?u.6835080
inst✝ : IsROrC K
a : K
h : ‖a‖ ≤ ↑re a
⊢ ↑(↑re a) = a
Theorem: HahnSeries.SummableFamily.embDomain_image
File: Mathlib/RingTheory/HahnSeries.lean

tactic: rw [embDomain_apply, dif_pos (Set.mem_range_self a)]
state_before: Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddCommMonoid R
α : Type u_4
β : Type u_3
s : SummableFamily Γ R α
f : α ↪ β
a : α
b : β
⊢ toFun (embDomain s f) (↑f a) = toFun s a

tactic: exact congr rfl (f.injective (Classical.choose_spec (Set.mem_range_self a)))
state_before: Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddCommMonoid R
α : Type u_4
β : Type u_3
s : SummableFamily Γ R α
f : α ↪ β
a : α
b : β
⊢ toFun s (Classical.choose (_ : ↑f a ∈ Set.range ↑f)) = toFun s a