tasksource/leandojo huggingface dataset:
Theorem: ProbabilityTheory.kernel.comapRight_apply'
File: Mathlib/Probability/Kernel/Basic.lean

tactic: rw [comapRight_apply,
  Measure.comap_apply _ hf.injective (fun s => hf.measurableSet_image.mpr) _ ht]
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.1452280
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
γ : Type u_3
mγ : MeasurableSpace γ
f : γ → β
κ : { x // x ∈ kernel α β }
hf : MeasurableEmbedding f
a : α
t : Set γ
ht : MeasurableSet t
⊢ ↑↑(↑(comapRight κ hf) a) t = ↑↑(↑κ a) (f '' t)
Theorem: Polynomial.natDegree_pos_of_eval₂_root
File: Mathlib/Data/Polynomial/Degree/Lemmas.lean

tactic: have A : p = C (p.coeff 0) := eq_C_of_natDegree_le_zero hlt
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : eval₂ f z p = 0
inj : ∀ (x : R), ↑f x = 0 → x = 0
hlt : 0 ≥ natDegree p
⊢ False

tactic: rw [A, eval₂_C] at hz
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : eval₂ f z p = 0
inj : ∀ (x : R), ↑f x = 0 → x = 0
hlt : 0 ≥ natDegree p
A : p = ↑C (coeff p 0)
⊢ False

tactic: simp only [inj (p.coeff 0) hz, RingHom.map_zero] at A
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : ↑f (coeff p 0) = 0
inj : ∀ (x : R), ↑f x = 0 → x = 0
hlt : 0 ≥ natDegree p
A : p = ↑C (coeff p 0)
⊢ False

tactic: exact hp A
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : ↑f (coeff p 0) = 0
inj : ∀ (x : R), ↑f x = 0 → x = 0
hlt : 0 ≥ natDegree p
A : p = 0
⊢ False
Theorem: isUpperSet_compl
File: Mathlib/Order/UpperLower/Basic.lean

tactic: convert h.compl
state_before: α : Type u_1
β : Type ?u.1021
γ : Type ?u.1024
ι : Sort ?u.1027
κ : ι → Sort ?u.1032
inst✝¹ : LE α
inst✝ : LE β
s t : Set α
h : IsUpperSet (sᶜ)
⊢ IsLowerSet s

tactic: rw [compl_compl]
state_before: case h.e'_3
α : Type u_1
β : Type ?u.1021
γ : Type ?u.1024
ι : Sort ?u.1027
κ : ι → Sort ?u.1032
inst✝¹ : LE α
inst✝ : LE β
s t : Set α
h : IsUpperSet (sᶜ)
⊢ s = sᶜᶜ
Theorem: Real.comap_exp_nhds_zero
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: simp
state_before: α : Type ?u.151690
x y z : ℝ
l : Filter α
⊢ comap exp (𝓝[Set.range exp] 0) = atBot
Theorem: TypeVec.toSubtype_of_subtype_assoc
File: Mathlib/Data/TypeVec.lean

tactic: rw [← comp_assoc, toSubtype_of_subtype]
state_before: n : ℕ
α : TypeVec n
β : TypeVec n
p : α ⟹ repeat n Prop
f : β ⟹ Subtype_ p
⊢ toSubtype p ⊚ (ofSubtype fun i x => p i x) ⊚ f = f

tactic: simp
state_before: n : ℕ
α : TypeVec n
β : TypeVec n
p : α ⟹ repeat n Prop
f : β ⟹ Subtype_ p
⊢ id ⊚ f = f
Theorem: Polynomial.mapAlg_eq_map
File: Mathlib/Data/Polynomial/Lifts.lean

tactic: simp only [mapAlg, aeval_def, eval₂_eq_sum, map, algebraMap_apply, RingHom.coe_comp]
state_before: R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : Semiring S
inst✝ : Algebra R S
p : R[X]
⊢ ↑(mapAlg R S) p = map (algebraMap R S) p

tactic: ext
state_before: R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : Semiring S
inst✝ : Algebra R S
p : R[X]
⊢ (sum p fun e a => ↑C (↑(algebraMap R S) a) * X ^ e) = sum p fun e a => (↑C ∘ ↑(algebraMap R S)) a * X ^ e

tactic: congr
state_before: case a
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : Semiring S
inst✝ : Algebra R S
p : R[X]
n✝ : ℕ
⊢ coeff (sum p fun e a => ↑C (↑(algebraMap R S) a) * X ^ e) n✝ =
    coeff (sum p fun e a => (↑C ∘ ↑(algebraMap R S)) a * X ^ e) n✝
Theorem: Int.even_coe_nat
File: Mathlib/Data/Int/Parity.lean

tactic: rw_mod_cast [even_iff, Nat.even_iff]
state_before: m n✝ : ℤ
n : ℕ
⊢ Even ↑n ↔ Even n
Theorem: Int.ceil_sub_nat
File: Mathlib/Algebra/Order/Floor.lean

tactic: convert ceil_sub_int a n using 1
state_before: F : Type ?u.214801
α : Type u_1
β : Type ?u.214807
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
n : ℕ
⊢ ⌈a - ↑n⌉ = ⌈a⌉ - ↑n

tactic: simp
state_before: case h.e'_2
F : Type ?u.214801
α : Type u_1
β : Type ?u.214807
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
n : ℕ
⊢ ⌈a - ↑n⌉ = ⌈a - ↑↑n⌉
Theorem: dense_biInter_of_Gδ
File: Mathlib/Topology/MetricSpace/Baire.lean

tactic: rw [biInter_eq_iInter]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.23152
ι : Type ?u.23155
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
S : Set β
f : (x : β) → x ∈ S → Set α
ho : ∀ (s : β) (H : s ∈ S), IsGδ (f s H)
hS : Set.Countable S
hd : ∀ (s : β) (H : s ∈ S), Dense (f s H)
⊢ Dense (⋂ (s : β) (h : s ∈ S), f s h)

tactic: haveI := hS.toEncodable
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.23152
ι : Type ?u.23155
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
S : Set β
f : (x : β) → x ∈ S → Set α
ho : ∀ (s : β) (H : s ∈ S), IsGδ (f s H)
hS : Set.Countable S
hd : ∀ (s : β) (H : s ∈ S), Dense (f s H)
⊢ Dense (⋂ (x : ↑S), f ↑x (_ : ↑x ∈ S))

tactic: exact dense_iInter_of_Gδ (fun s => ho s s.2) fun s => hd s s.2
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.23152
ι : Type ?u.23155
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
S : Set β
f : (x : β) → x ∈ S → Set α
ho : ∀ (s : β) (H : s ∈ S), IsGδ (f s H)
hS : Set.Countable S
hd : ∀ (s : β) (H : s ∈ S), Dense (f s H)
this : Encodable ↑S
⊢ Dense (⋂ (x : ↑S), f ↑x (_ : ↑x ∈ S))
Theorem: Mathlib.Tactic.Abel.zero_smulg
File: Mathlib/Tactic/Abel.lean

tactic: simp [smulg, zsmul_zero]
state_before: α : Type u_1
inst✝ : AddCommGroup α
c : ℤ
⊢ smulg c 0 = 0
Theorem: PrimeMultiset.coe_prod
File: Mathlib/Data/PNat/Factors.lean

tactic: let h : (v.prod : ℕ) = ((v.map Coe.coe).map Coe.coe).prod :=
  PNat.coeMonoidHom.map_multiset_prod v.toPNatMultiset
state_before: v : PrimeMultiset
⊢ ↑(prod v) = Multiset.prod (toNatMultiset v)

tactic: rw [Multiset.map_map] at h
state_before: v : PrimeMultiset
h : ↑(prod v) = Multiset.prod (Multiset.map Coe.coe (Multiset.map Coe.coe v)) :=
  MonoidHom.map_multiset_prod PNat.coeMonoidHom (toPNatMultiset v)
⊢ ↑(prod v) = Multiset.prod (toNatMultiset v)

tactic: have : (Coe.coe : ℕ+ → ℕ) ∘ (Coe.coe : Nat.Primes → ℕ+) = Coe.coe := funext fun p => rfl
state_before: v : PrimeMultiset
h : ↑(prod v) = Multiset.prod (Multiset.map (Coe.coe ∘ Coe.coe) v)
⊢ ↑(prod v) = Multiset.prod (toNatMultiset v)

tactic: rw [this] at h
state_before: v : PrimeMultiset
h : ↑(prod v) = Multiset.prod (Multiset.map (Coe.coe ∘ Coe.coe) v)
this : Coe.coe ∘ Coe.coe = Coe.coe
⊢ ↑(prod v) = Multiset.prod (toNatMultiset v)

tactic: exact h
state_before: v : PrimeMultiset
h : ↑(prod v) = Multiset.prod (Multiset.map Coe.coe v)
this : Coe.coe ∘ Coe.coe = Coe.coe
⊢ ↑(prod v) = Multiset.prod (toNatMultiset v)
Theorem: LocallyConstant.ofClopen_fiber_zero
File: Mathlib/Topology/LocallyConstant/Basic.lean

tactic: ext
state_before: X✝ : Type ?u.19442
Y : Type ?u.19445
Z : Type ?u.19448
α : Type ?u.19451
inst✝² : TopologicalSpace X✝
X : Type u_1
inst✝¹ : TopologicalSpace X
U : Set X
inst✝ : (x : X) → Decidable (x ∈ U)
hU : IsClopen U
⊢ ↑(ofClopen hU) ⁻¹' {0} = U

tactic: simp only [ofClopen, mem_singleton_iff, Fin.one_eq_zero_iff, coe_mk, mem_preimage,
  ite_eq_left_iff, Nat.succ_succ_ne_one]
state_before: case h
X✝ : Type ?u.19442
Y : Type ?u.19445
Z : Type ?u.19448
α : Type ?u.19451
inst✝² : TopologicalSpace X✝
X : Type u_1
inst✝¹ : TopologicalSpace X
U : Set X
inst✝ : (x : X) → Decidable (x ∈ U)
hU : IsClopen U
x✝ : X
⊢ x✝ ∈ ↑(ofClopen hU) ⁻¹' {0} ↔ x✝ ∈ U

tactic: tauto
state_before: case h
X✝ : Type ?u.19442
Y : Type ?u.19445
Z : Type ?u.19448
α : Type ?u.19451
inst✝² : TopologicalSpace X✝
X : Type u_1
inst✝¹ : TopologicalSpace X
U : Set X
inst✝ : (x : X) → Decidable (x ∈ U)
hU : IsClopen U
x✝ : X
⊢ ¬x✝ ∈ U → False ↔ x✝ ∈ U
Theorem: lp.norm_nonneg'
File: Mathlib/Analysis/NormedSpace/lpSpace.lean

tactic: rcases p.trichotomy with (rfl | rfl | hp)
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E p }
⊢ 0 ≤ ‖f‖

tactic: simp [lp.norm_eq_card_dsupport f]
state_before: case inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E 0 }
⊢ 0 ≤ ‖f‖

tactic: cases' isEmpty_or_nonempty α with _i _i
state_before: case inr.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E ⊤ }
⊢ 0 ≤ ‖f‖

tactic: inhabit α
state_before: case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E ⊤ }
_i : Nonempty α
⊢ 0 ≤ ‖f‖

tactic: exact (norm_nonneg (f default)).trans ((lp.isLUB_norm f).1 ⟨default, rfl⟩)
state_before: case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E ⊤ }
_i : Nonempty α
inhabited_h : Inhabited α
⊢ 0 ≤ ‖f‖

tactic: rw [lp.norm_eq_ciSup]
state_before: case inr.inl.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E ⊤ }
_i : IsEmpty α
⊢ 0 ≤ ‖f‖

tactic: simp [Real.ciSup_empty]
state_before: case inr.inl.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E ⊤ }
_i : IsEmpty α
⊢ 0 ≤ ⨆ (i : α), ‖↑f i‖

tactic: rw [lp.norm_eq_tsum_rpow hp f]
state_before: case inr.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E p }
hp : 0 < ENNReal.toReal p
⊢ 0 ≤ ‖f‖

tactic: refine' Real.rpow_nonneg_of_nonneg (tsum_nonneg _) _
state_before: case inr.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E p }
hp : 0 < ENNReal.toReal p
⊢ 0 ≤ (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

tactic: exact fun i => Real.rpow_nonneg_of_nonneg (norm_nonneg _) _
state_before: case inr.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : { x // x ∈ lp E p }
hp : 0 < ENNReal.toReal p
⊢ ∀ (i : α), 0 ≤ ‖↑f i‖ ^ ENNReal.toReal p
Theorem: Set.preimage_mul_const_Ico_of_neg
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ici_inter_Iio, ← Ioi_inter_Iic, h, inter_comm]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a b c : α
h : c < 0
⊢ (fun x => x * c) ⁻¹' Ico a b = Ioc (b / c) (a / c)
Theorem: extChartAt_preimage_mem_nhds'
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: rwa [← extChartAt_source I]
state_before: 𝕜 : Type u_3
E : Type u_2
M : Type u_1
H : Type u_4
E' : Type ?u.222306
M' : Type ?u.222309
H' : Type ?u.222312
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
f f' : LocalHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝⁵ : NormedAddCommGroup E'
inst✝⁴ : NormedSpace 𝕜 E'
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
x : M
s t : Set M
inst✝¹ : ChartedSpace H M
inst✝ : ChartedSpace H' M'
x' : M
h : x' ∈ (extChartAt I x).source
ht : t ∈ 𝓝 x'
⊢ x' ∈ (chartAt H x).toLocalEquiv.source
Theorem: exists_inv_mem_iff_exists_mem
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: rintro ⟨x, x_in, hx⟩
state_before: case mpr
G : Type u_1
G' : Type ?u.10955
inst✝⁶ : Group G
inst✝⁵ : Group G'
A : Type ?u.10964
inst✝⁴ : AddGroup A
M : Type ?u.10970
S : Type u_2
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
⊢ (∃ x, x ∈ H ∧ P x) → ∃ x, x ∈ H ∧ P x⁻¹

tactic: exact ⟨x⁻¹, inv_mem x_in, by simp [hx]⟩
state_before: case mpr.intro.intro
G : Type u_1
G' : Type ?u.10955
inst✝⁶ : Group G
inst✝⁵ : Group G'
A : Type ?u.10964
inst✝⁴ : AddGroup A
M : Type ?u.10970
S : Type u_2
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
x : G
x_in : x ∈ H
hx : P x
⊢ ∃ x, x ∈ H ∧ P x⁻¹

tactic: simp [hx]
state_before: G : Type u_1
G' : Type ?u.10955
inst✝⁶ : Group G
inst✝⁵ : Group G'
A : Type ?u.10964
inst✝⁴ : AddGroup A
M : Type ?u.10970
S : Type u_2
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
x : G
x_in : x ∈ H
hx : P x
⊢ P x⁻¹⁻¹
Theorem: List.join_eq_joinTR
File: Std/Data/List/Basic.lean

tactic: funext α l
state_before: ⊢ @join = @joinTR

tactic: rw [← List.bind_id, List.bind_eq_bindTR]
state_before: case h.h
α : Type u_1
l : List (List α)
⊢ join l = joinTR l

tactic: rfl
state_before: case h.h
α : Type u_1
l : List (List α)
⊢ bindTR l id = joinTR l
Theorem: Group.toDivInvMonoid_injective
File: Mathlib/Algebra/Group/Defs.lean

tactic: rintro ⟨⟩ ⟨⟩ ⟨⟩
state_before: G✝ : Type ?u.58492
G : Type u_1
⊢ Injective (@toDivInvMonoid G)

tactic: rfl
state_before: case mk.mk.refl
G✝ : Type ?u.58492
G : Type u_1
toDivInvMonoid✝ : DivInvMonoid G
mul_left_inv✝¹ mul_left_inv✝ : ∀ (a : G), a⁻¹ * a = 1
⊢ mk mul_left_inv✝¹ = mk mul_left_inv✝
Theorem: Int.lt_iff_le_not_le
File: Std/Data/Int/Lemmas.lean

tactic: rw [Int.lt_iff_le_and_ne]
state_before: a b : Int
⊢ a < b ↔ a ≤ b ∧ ¬b ≤ a

tactic: constructor <;> refine fun ⟨h, h'⟩ => ⟨h, h'.imp fun h' => ?_⟩
state_before: a b : Int
⊢ a ≤ b ∧ a ≠ b ↔ a ≤ b ∧ ¬b ≤ a

tactic: exact Int.le_antisymm h h'
state_before: case mp
a b : Int
x✝ : a ≤ b ∧ a ≠ b
h : a ≤ b
h'✝ : a ≠ b
h' : b ≤ a
⊢ a = b

tactic: subst h'
state_before: case mpr
a b : Int
x✝ : a ≤ b ∧ ¬b ≤ a
h : a ≤ b
h'✝ : ¬b ≤ a
h' : a = b
⊢ b ≤ a

tactic: apply Int.le_refl
state_before: case mpr
a : Int
x✝ : a ≤ a ∧ ¬a ≤ a
h : a ≤ a
h' : ¬a ≤ a
⊢ a ≤ a
Theorem: Ordinal.bsup_not_succ_of_ne_bsup
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [← sup_eq_bsup] at *
state_before: α : Type ?u.312340
β : Type ?u.312343
γ : Type ?u.312346
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
hf : ∀ {i : Ordinal} (h : i < o), f i h ≠ bsup o f
a : Ordinal
⊢ a < bsup o f → succ a < bsup o f

tactic: exact sup_not_succ_of_ne_sup fun i => hf _
state_before: α : Type ?u.312340
β : Type ?u.312343
γ : Type ?u.312346
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
hf : ∀ {i : Ordinal} (h : i < o), f i h ≠ sup (familyOfBFamily o f)
a : Ordinal
⊢ a < sup (familyOfBFamily o f) → succ a < sup (familyOfBFamily o f)
Theorem: Polynomial.degree_smul_of_smul_regular
File: Mathlib/Data/Polynomial/Monic.lean

tactic: refine' le_antisymm _ _
state_before: R : Type u
S✝ : Type v
a b : R
m n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
⊢ degree (k • p) = degree p

tactic: rw [degree_le_iff_coeff_zero]
state_before: case refine'_1
R : Type u
S✝ : Type v
a b : R
m n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
⊢ degree (k • p) ≤ degree p

tactic: intro m hm
state_before: case refine'_1
R : Type u
S✝ : Type v
a b : R
m n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
⊢ ∀ (m : ℕ), degree p < ↑m → coeff (k • p) m = 0

tactic: rw [degree_lt_iff_coeff_zero] at hm
state_before: case refine'_1
R : Type u
S✝ : Type v
a b : R
m✝ n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
m : ℕ
hm : degree p < ↑m
⊢ coeff (k • p) m = 0

tactic: simp [hm m le_rfl]
state_before: case refine'_1
R : Type u
S✝ : Type v
a b : R
m✝ n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
m : ℕ
hm : ∀ (m_1 : ℕ), m ≤ m_1 → coeff p m_1 = 0
⊢ coeff (k • p) m = 0

tactic: rw [degree_le_iff_coeff_zero]
state_before: case refine'_2
R : Type u
S✝ : Type v
a b : R
m n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
⊢ degree p ≤ degree (k • p)

tactic: intro m hm
state_before: case refine'_2
R : Type u
S✝ : Type v
a b : R
m n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
⊢ ∀ (m : ℕ), degree (k • p) < ↑m → coeff p m = 0

tactic: rw [degree_lt_iff_coeff_zero] at hm
state_before: case refine'_2
R : Type u
S✝ : Type v
a b : R
m✝ n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
m : ℕ
hm : degree (k • p) < ↑m
⊢ coeff p m = 0

tactic: refine' h _
state_before: case refine'_2
R : Type u
S✝ : Type v
a b : R
m✝ n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
m : ℕ
hm : ∀ (m_1 : ℕ), m ≤ m_1 → coeff (k • p) m_1 = 0
⊢ coeff p m = 0

tactic: simpa using hm m le_rfl
state_before: case refine'_2
R : Type u
S✝ : Type v
a b : R
m✝ n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
m : ℕ
hm : ∀ (m_1 : ℕ), m ≤ m_1 → coeff (k • p) m_1 = 0
⊢ (fun x => k • x) (coeff p m) = (fun x => k • x) 0
Theorem: sameRay_or_ne_zero_and_sameRay_neg_iff_not_linearIndependent
File: Mathlib/LinearAlgebra/Ray.lean

tactic: rw [← sameRay_or_sameRay_neg_iff_not_linearIndependent]
state_before: R : Type u_1
inst✝³ : LinearOrderedCommRing R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : NoZeroSMulDivisors R M
x y : M
⊢ SameRay R x y ∨ x ≠ 0 ∧ y ≠ 0 ∧ SameRay R x (-y) ↔ ¬LinearIndependent R ![x, y]

tactic: by_cases hx : x = 0
state_before: R : Type u_1
inst✝³ : LinearOrderedCommRing R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : NoZeroSMulDivisors R M
x y : M
⊢ SameRay R x y ∨ x ≠ 0 ∧ y ≠ 0 ∧ SameRay R x (-y) ↔ SameRay R x y ∨ SameRay R x (-y)

tactic: by_cases hy : y = 0 <;> simp [hx, hy]
state_before: case neg
R : Type u_1
inst✝³ : LinearOrderedCommRing R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : NoZeroSMulDivisors R M
x y : M
hx : ¬x = 0
⊢ SameRay R x y ∨ x ≠ 0 ∧ y ≠ 0 ∧ SameRay R x (-y) ↔ SameRay R x y ∨ SameRay R x (-y)

tactic: simp [hx]
state_before: case pos
R : Type u_1
inst✝³ : LinearOrderedCommRing R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : NoZeroSMulDivisors R M
x y : M
hx : x = 0
⊢ SameRay R x y ∨ x ≠ 0 ∧ y ≠ 0 ∧ SameRay R x (-y) ↔ SameRay R x y ∨ SameRay R x (-y)
Theorem: CategoryTheory.Limits.cospanExt_app_one
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: dsimp [cospanExt]
state_before: C : Type u
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
X Y Z X' Y' Z' : C
iX : X ≅ X'
iY : Y ≅ Y'
iZ : Z ≅ Z'
f : X ⟶ Z
g : Y ⟶ Z
f' : X' ⟶ Z'
g' : Y' ⟶ Z'
wf : iX.hom ≫ f' = f ≫ iZ.hom
wg : iY.hom ≫ g' = g ≫ iZ.hom
⊢ (cospanExt iX iY iZ wf wg).app WalkingCospan.one = iZ
Theorem: MeasureTheory.Measure.restrict_sum
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp only [sum_apply, restrict_apply, ht, ht.inter hs]
state_before: α : Type u_1
β : Type ?u.344710
γ : Type ?u.344713
δ : Type ?u.344716
ι : Type u_2
R : Type ?u.344722
R' : Type ?u.344725
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t✝ : Set α
μ : ι → Measure α
s : Set α
hs : MeasurableSet s
t : Set α
ht : MeasurableSet t
⊢ ↑↑(restrict (sum μ) s) t = ↑↑(sum fun i => restrict (μ i) s) t
Theorem: Int.shiftr_negSucc
File: Mathlib/Data/Int/Bitwise.lean

tactic: cases n <;> rfl
state_before: m n : ℕ
⊢ shiftr -[m+1] ↑n = -[Nat.shiftr m n+1]
Theorem: Nat.ArithmeticFunction.zeta_LSeriesSummable_iff_one_lt_re
File: Mathlib/NumberTheory/LSeries.lean

tactic: rw [← LSeriesSummable_iff_of_re_eq_re (Complex.ofReal_re z.re), LSeriesSummable, ←
  summable_norm_iff, ← Real.summable_one_div_nat_rpow, iff_iff_eq]
state_before: z : ℂ
⊢ LSeriesSummable (↑ζ) z ↔ 1 < z.re

tactic: by_cases h0 : z.re = 0
state_before: z : ℂ
⊢ (Summable fun x => ‖↑↑ζ x / ↑x ^ ↑z.re‖) = Summable fun n => 1 / ↑n ^ z.re

tactic: rw [h0, ← summable_nat_add_iff 1]
state_before: case pos
z : ℂ
h0 : z.re = 0
⊢ (Summable fun x => ‖↑↑ζ x / ↑x ^ ↑z.re‖) = Summable fun n => 1 / ↑n ^ z.re

tactic: apply congr rfl
state_before: case pos
z : ℂ
h0 : z.re = 0
⊢ (Summable fun n => ‖↑↑ζ (n + 1) / ↑(n + 1) ^ ↑0‖) = Summable fun n => 1 / ↑n ^ 0

tactic: ext n
state_before: case pos
z : ℂ
h0 : z.re = 0
⊢ (fun n => ‖↑↑ζ (n + 1) / ↑(n + 1) ^ ↑0‖) = fun n => 1 / ↑n ^ 0

tactic: simp [n.succ_ne_zero]
state_before: case pos.h
z : ℂ
h0 : z.re = 0
n : ℕ
⊢ ‖↑↑ζ (n + 1) / ↑(n + 1) ^ ↑0‖ = 1 / ↑n ^ 0

tactic: apply congr rfl
state_before: case neg
z : ℂ
h0 : ¬z.re = 0
⊢ (Summable fun x => ‖↑↑ζ x / ↑x ^ ↑z.re‖) = Summable fun n => 1 / ↑n ^ z.re

tactic: ext ⟨- | n⟩
state_before: case neg
z : ℂ
h0 : ¬z.re = 0
⊢ (fun x => ‖↑↑ζ x / ↑x ^ ↑z.re‖) = fun n => 1 / ↑n ^ z.re

tactic: simp only [cast_zero, natCoe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div,
  Complex.norm_eq_abs, map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]
state_before: case neg.h.succ
z : ℂ
h0 : ¬z.re = 0
n✝ : ℕ
⊢ ‖↑↑ζ (succ n✝) / ↑(succ n✝) ^ ↑z.re‖ = 1 / ↑(succ n✝) ^ z.re

tactic: rw [← cast_one, ← cast_add, Complex.abs_of_nat, cast_add, cast_one]
state_before: case neg.h.succ
z : ℂ
h0 : ¬z.re = 0
n✝ : ℕ
⊢ ↑Complex.abs (↑n✝ + 1) ^ z.re = (↑n✝ + 1) ^ z.re

tactic: simp [h0]
state_before: case neg.h.zero
z : ℂ
h0 : ¬z.re = 0
⊢ ‖↑↑ζ Nat.zero / ↑Nat.zero ^ ↑z.re‖ = 1 / ↑Nat.zero ^ z.re
Theorem: Real.logb_nonpos_iff'
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rcases hx.eq_or_lt with (rfl | hx)
state_before: b x y : ℝ
hb : 1 < b
hx : 0 ≤ x
⊢ logb b x ≤ 0 ↔ x ≤ 1

tactic: exact logb_nonpos_iff hb hx
state_before: case inr
b x y : ℝ
hb : 1 < b
hx✝ : 0 ≤ x
hx : 0 < x
⊢ logb b x ≤ 0 ↔ x ≤ 1

tactic: simp [le_refl, zero_le_one]
state_before: case inl
b y : ℝ
hb : 1 < b
hx : 0 ≤ 0
⊢ logb b 0 ≤ 0 ↔ 0 ≤ 1
Theorem: calc_deriv_dist
File: Mathlib/NumberTheory/Padics/Hensel.lean

tactic: simp only [sub_eq_add_neg, add_assoc, hz', add_add_neg_cancel'_right, norm_neg]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
F : Polynomial ℤ_[p]
a : ℤ_[p]
hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2
hnsol : Polynomial.eval a F ≠ 0
z z' z1 : ℤ_[p]
hz' : z' = z - z1
hz1 : ‖z1‖ = ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖
n : ℕ
hz : ih_gen n z
⊢ ‖z' - z‖ = ‖z1‖

tactic: gcongr
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
F : Polynomial ℤ_[p]
a : ℤ_[p]
hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2
hnsol : Polynomial.eval a F ≠ 0
z z' z1 : ℤ_[p]
hz' : z' = z - z1
hz1 : ‖z1‖ = ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖
n : ℕ
hz : ih_gen n z
⊢ ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ≤
    ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n /
      ‖Polynomial.eval a (↑Polynomial.derivative F)‖

tactic: apply hz.2
state_before: case h
p : ℕ
inst✝ : Fact (Nat.Prime p)
F : Polynomial ℤ_[p]
a : ℤ_[p]
hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2
hnsol : Polynomial.eval a F ≠ 0
z z' z1 : ℤ_[p]
hz' : z' = z - z1
hz1 : ‖z1‖ = ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖
n : ℕ
hz : ih_gen n z
⊢ ‖Polynomial.eval z F‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n
Theorem: FermatPsp.base_one
File: Mathlib/NumberTheory/FermatPsp.lean

tactic: refine' ⟨show n ∣ 1 ^ (n - 1) - 1 from _, h₂, h₁⟩
state_before: n : ℕ
h₁ : 1 < n
h₂ : ¬Nat.Prime n
⊢ FermatPsp n 1

tactic: exact show 0 = 1 ^ (n - 1) - 1 by norm_num ▸ dvd_zero n
state_before: n : ℕ
h₁ : 1 < n
h₂ : ¬Nat.Prime n
⊢ n ∣ 1 ^ (n - 1) - 1

tactic: norm_num
state_before: n : ℕ
h₁ : 1 < n
h₂ : ¬Nat.Prime n
⊢ 0 = 1 ^ (n - 1) - 1
Theorem: NNReal.inv_lt_one_iff
File: Mathlib/Data/Real/NNReal.lean

tactic: rw [← one_div, div_lt_iff hx, one_mul]
state_before: x : ℝ≥0
hx : x ≠ 0
⊢ x⁻¹ < 1 ↔ 1 < x