tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.lintegral_count'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [count, lintegral_sum_measure]
state_before: α : Type u_1
β : Type ?u.1693528
γ : Type ?u.1693531
δ : Type ?u.1693534
m : MeasurableSpace α
μ ν : Measure α
inst✝ : MeasurableSpace α
f : α → ℝ≥0∞
hf : Measurable f
⊢ (∫⁻ (a : α), f a ∂count) = ∑' (a : α), f a

tactic: congr
state_before: α : Type u_1
β : Type ?u.1693528
γ : Type ?u.1693531
δ : Type ?u.1693534
m : MeasurableSpace α
μ ν : Measure α
inst✝ : MeasurableSpace α
f : α → ℝ≥0∞
hf : Measurable f
⊢ (∑' (i : α), ∫⁻ (a : α), f a ∂dirac i) = ∑' (a : α), f a

tactic: exact funext fun a => lintegral_dirac' a hf
state_before: case e_f
α : Type u_1
β : Type ?u.1693528
γ : Type ?u.1693531
δ : Type ?u.1693534
m : MeasurableSpace α
μ ν : Measure α
inst✝ : MeasurableSpace α
f : α → ℝ≥0∞
hf : Measurable f
⊢ (fun i => ∫⁻ (a : α), f a ∂dirac i) = fun a => f a
Theorem: Set.image_div_const_uIcc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp only [div_eq_mul_inv, image_mul_const_uIcc]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a b c : α
⊢ (fun x => x / a) '' [[b, c]] = [[b / a, c / a]]
Theorem: PadicInt.maximalIdeal_eq_span_p
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: apply le_antisymm
state_before: p : ℕ
hp : Fact (Nat.Prime p)
⊢ maximalIdeal ℤ_[p] = Ideal.span {↑p}

tactic: intro x hx
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
⊢ maximalIdeal ℤ_[p] ≤ Ideal.span {↑p}

tactic: simp only [LocalRing.mem_maximalIdeal, mem_nonunits] at hx
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
x : ℤ_[p]
hx : x ∈ maximalIdeal ℤ_[p]
⊢ x ∈ Ideal.span {↑p}

tactic: rwa [Ideal.mem_span_singleton, ← norm_lt_one_iff_dvd]
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
x : ℤ_[p]
hx : ‖x‖ < 1
⊢ x ∈ Ideal.span {↑p}

tactic: rw [Ideal.span_le, Set.singleton_subset_iff]
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
⊢ Ideal.span {↑p} ≤ maximalIdeal ℤ_[p]

tactic: exact p_nonnunit
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
⊢ ↑p ∈ ↑(maximalIdeal ℤ_[p])
Theorem: SimpleGraph.ConnectedComponent.map_id
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: refine' C.ind _
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
C : ConnectedComponent G
⊢ map Hom.id C = C

tactic: exact fun _ => rfl
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
C : ConnectedComponent G
⊢ ∀ (v : V), map Hom.id (connectedComponentMk G v) = connectedComponentMk G v
Theorem: Filter.eventually_smallSets_forall
File: Mathlib/Order/Filter/SmallSets.lean

tactic: simpa only [inf_top_eq, eventually_top] using @eventually_smallSets_eventually α l ⊤ p
state_before: α : Type u_1
β : Type ?u.6026
ι : Sort ?u.6029
l l' la : Filter α
lb : Filter β
p : α → Prop
⊢ (∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → p x) ↔ ∀ᶠ (x : α) in l, p x
Theorem: AddCircle.addOrderOf_div_of_gcd_eq_one'
File: Mathlib/Topology/Instances/AddCircle.lean

tactic: induction m
state_before: 𝕜 : Type u_1
B : Type ?u.190115
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : 𝕜
hp : Fact (0 < p)
m : ℤ
n : ℕ
hn : 0 < n
h : Nat.gcd (Int.natAbs m) n = 1
⊢ addOrderOf ↑(↑m / ↑n * p) = n

tactic: simp only [Int.ofNat_eq_coe, Int.cast_ofNat, Int.natAbs_ofNat] at h⊢
state_before: case ofNat
𝕜 : Type u_1
B : Type ?u.190115
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : 𝕜
hp : Fact (0 < p)
n : ℕ
hn : 0 < n
a✝ : ℕ
h : Nat.gcd (Int.natAbs (Int.ofNat a✝)) n = 1
⊢ addOrderOf ↑(↑(Int.ofNat a✝) / ↑n * p) = n

tactic: exact addOrderOf_div_of_gcd_eq_one hn h
state_before: case ofNat
𝕜 : Type u_1
B : Type ?u.190115
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : 𝕜
hp : Fact (0 < p)
n : ℕ
hn : 0 < n
a✝ : ℕ
h : Nat.gcd a✝ n = 1
⊢ addOrderOf ↑(↑a✝ / ↑n * p) = n

tactic: simp only [Int.cast_negSucc, neg_div, neg_mul, coe_neg, addOrderOf_neg]
state_before: case negSucc
𝕜 : Type u_1
B : Type ?u.190115
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : 𝕜
hp : Fact (0 < p)
n : ℕ
hn : 0 < n
a✝ : ℕ
h : Nat.gcd (Int.natAbs (Int.negSucc a✝)) n = 1
⊢ addOrderOf ↑(↑(Int.negSucc a✝) / ↑n * p) = n

tactic: exact addOrderOf_div_of_gcd_eq_one hn h
state_before: case negSucc
𝕜 : Type u_1
B : Type ?u.190115
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : 𝕜
hp : Fact (0 < p)
n : ℕ
hn : 0 < n
a✝ : ℕ
h : Nat.gcd (Int.natAbs (Int.negSucc a✝)) n = 1
⊢ addOrderOf ↑(↑(a✝ + 1) / ↑n * p) = n
Theorem: Std.HashMap.Imp.WF.out
File: Std/Data/HashMap/WF.lean

tactic: induction h with
| mk h₁ h₂ => exact ⟨h₁, h₂⟩
| @empty' _ h => exact ⟨(Bucket.mk_size h).symm, .mk' h⟩
| insert _ ih => exact ⟨insert_size ih.1, insert_WF ih.2⟩
| erase _ ih => exact ⟨erase_size ih.1, erase_WF ih.2⟩
| modify _ ih => exact ⟨modify_size ih.1, modify_WF ih.2⟩
state_before: α : Type u_1
β : Type u_2
inst✝¹ : BEq α
inst✝ : Hashable α
m : Imp α β
h : WF m
⊢ m.size = Bucket.size m.buckets ∧ Bucket.WF m.buckets

tactic: exact ⟨h₁, h₂⟩
state_before: case mk
α : Type u_1
β : Type u_2
inst✝¹ : BEq α
inst✝ : Hashable α
m m✝ : Imp α β
h₁ : m✝.size = Bucket.size m✝.buckets
h₂ : Bucket.WF m✝.buckets
⊢ m✝.size = Bucket.size m✝.buckets ∧ Bucket.WF m✝.buckets

tactic: exact ⟨(Bucket.mk_size h).symm, .mk' h⟩
state_before: case empty'
α : Type u_1
β : Type u_2
inst✝¹ : BEq α
inst✝ : Hashable α
m : Imp α β
n✝ : Nat
h : 0 < n✝
⊢ (Imp.empty' n✝).size = Bucket.size (Imp.empty' n✝).buckets ∧ Bucket.WF (Imp.empty' n✝).buckets

tactic: exact ⟨insert_size ih.1, insert_WF ih.2⟩
state_before: case insert
α : Type u_1
β : Type u_2
inst✝¹ : BEq α
inst✝ : Hashable α
m m✝ : Imp α β
a✝¹ : α
b✝ : β
a✝ : WF m✝
ih : m✝.size = Bucket.size m✝.buckets ∧ Bucket.WF m✝.buckets
⊢ (Imp.insert m✝ a✝¹ b✝).size = Bucket.size (Imp.insert m✝ a✝¹ b✝).buckets ∧ Bucket.WF (Imp.insert m✝ a✝¹ b✝).buckets

tactic: exact ⟨erase_size ih.1, erase_WF ih.2⟩
state_before: case erase
α : Type u_1
β : Type u_2
inst✝¹ : BEq α
inst✝ : Hashable α
m m✝ : Imp α β
a✝¹ : α
a✝ : WF m✝
ih : m✝.size = Bucket.size m✝.buckets ∧ Bucket.WF m✝.buckets
⊢ (Imp.erase m✝ a✝¹).size = Bucket.size (Imp.erase m✝ a✝¹).buckets ∧ Bucket.WF (Imp.erase m✝ a✝¹).buckets

tactic: exact ⟨modify_size ih.1, modify_WF ih.2⟩
state_before: case modify
α : Type u_1
β : Type u_2
inst✝¹ : BEq α
inst✝ : Hashable α
m m✝ : Imp α β
a✝¹ : α
f✝ : α → β → β
a✝ : WF m✝
ih : m✝.size = Bucket.size m✝.buckets ∧ Bucket.WF m✝.buckets
⊢ (Imp.modify m✝ a✝¹ f✝).size = Bucket.size (Imp.modify m✝ a✝¹ f✝).buckets ∧ Bucket.WF (Imp.modify m✝ a✝¹ f✝).buckets
Theorem: Set.ncard_insert_of_not_mem
File: Mathlib/Data/Set/Ncard.lean

tactic: classical
have hft := hs.fintype
rw [ncard_eq_toFinset_card _, ncard_eq_toFinset_card _, Finite.toFinset_insert,
  Finset.card_insert_of_not_mem]
rwa [Finite.mem_toFinset]
state_before: α : Type u_1
β : Type ?u.9534
s t : Set α
a b x y : α
f : α → β
h : ¬a ∈ s
hs : autoParam (Set.Finite s) _auto✝
⊢ ncard (insert a s) = ncard s + 1

tactic: have hft := hs.fintype
state_before: α : Type u_1
β : Type ?u.9534
s t : Set α
a b x y : α
f : α → β
h : ¬a ∈ s
hs : autoParam (Set.Finite s) _auto✝
⊢ ncard (insert a s) = ncard s + 1

tactic: rw [ncard_eq_toFinset_card _, ncard_eq_toFinset_card _, Finite.toFinset_insert,
  Finset.card_insert_of_not_mem]
state_before: α : Type u_1
β : Type ?u.9534
s t : Set α
a b x y : α
f : α → β
h : ¬a ∈ s
hs : autoParam (Set.Finite s) _auto✝
hft : Fintype ↑s
⊢ ncard (insert a s) = ncard s + 1

tactic: rwa [Finite.mem_toFinset]
state_before: α : Type u_1
β : Type ?u.9534
s t : Set α
a b x y : α
f : α → β
h : ¬a ∈ s
hs : autoParam (Set.Finite s) _auto✝
hft : Fintype ↑s
⊢ ¬a ∈ Finite.toFinset (_ : Set.Finite s)
Theorem: Nat.coprime_add_mul_left_right
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: rw [coprime, coprime, gcd_add_mul_left_right]
state_before: m n k : ℕ
⊢ coprime m (n + m * k) ↔ coprime m n
Theorem: Multiset.card_nsmul
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [card.map_nsmul s n, Nat.nsmul_eq_mul]
state_before: α : Type u_1
β : Type ?u.55179
γ : Type ?u.55182
s : Multiset α
n : ℕ
⊢ ↑card (n • s) = n * ↑card s
Theorem: Int.dvd_sub_of_emod_eq
File: Std/Data/Int/DivMod.lean

tactic: have hx : (a % b) % b = c % b := by
  rw [h]
state_before: a b c : Int
h : a % b = c
⊢ b ∣ a - c

tactic: rw [Int.emod_emod, ← emod_sub_cancel_right c, Int.sub_self, zero_emod] at hx
state_before: a b c : Int
h : a % b = c
hx : a % b % b = c % b
⊢ b ∣ a - c

tactic: exact dvd_of_emod_eq_zero hx
state_before: a b c : Int
h : a % b = c
hx : (a - c) % b = 0
⊢ b ∣ a - c

tactic: rw [h]
state_before: a b c : Int
h : a % b = c
⊢ a % b % b = c % b
Theorem: Stream'.nats_eq
File: Mathlib/Data/Stream/Init.lean

tactic: apply Stream'.ext
state_before: α : Type u
β : Type v
δ : Type w
⊢ nats = 0 :: map succ nats

tactic: intro n
state_before: case a
α : Type u
β : Type v
δ : Type w
⊢ ∀ (n : ℕ), nth nats n = nth (0 :: map succ nats) n

tactic: cases n
state_before: case a
α : Type u
β : Type v
δ : Type w
n : ℕ
⊢ nth nats n = nth (0 :: map succ nats) n

tactic: rfl
state_before: case a.zero
α : Type u
β : Type v
δ : Type w
⊢ nth nats zero = nth (0 :: map succ nats) zero

case a.succ
α : Type u
β : Type v
δ : Type w
n✝ : ℕ
⊢ nth nats (succ n✝) = nth (0 :: map succ nats) (succ n✝)

tactic: rw [nth_succ]
state_before: case a.succ
α : Type u
β : Type v
δ : Type w
n✝ : ℕ
⊢ nth nats (succ n✝) = nth (0 :: map succ nats) (succ n✝)

tactic: rfl
state_before: case a.succ
α : Type u
β : Type v
δ : Type w
n✝ : ℕ
⊢ nth (tail nats) n✝ = nth (0 :: map succ nats) (succ n✝)
Theorem: MeasureTheory.lintegral_add_left
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: refine' le_antisymm _ (le_lintegral_add _ _)
state_before: α : Type u_1
β : Type ?u.898603
γ : Type ?u.898606
δ : Type ?u.898609
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : Measurable f
g : α → ℝ≥0∞
⊢ (∫⁻ (a : α), f a + g a ∂μ) = (∫⁻ (a : α), f a ∂μ) + ∫⁻ (a : α), g a ∂μ

tactic: rcases exists_measurable_le_lintegral_eq μ fun a => f a + g a with ⟨φ, hφm, hφ_le, hφ_eq⟩
state_before: α : Type u_1
β : Type ?u.898603
γ : Type ?u.898606
δ : Type ?u.898609
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : Measurable f
g : α → ℝ≥0∞
⊢ (∫⁻ (a : α), f a + g a ∂μ) ≤ (∫⁻ (a : α), f a ∂μ) + ∫⁻ (a : α), g a ∂μ

tactic: calc
  (∫⁻ a, f a + g a ∂μ) = ∫⁻ a, φ a ∂μ := hφ_eq
  _ ≤ ∫⁻ a, f a + (φ a - f a) ∂μ := (lintegral_mono fun a => le_add_tsub)
  _ = (∫⁻ a, f a ∂μ) + ∫⁻ a, φ a - f a ∂μ := (lintegral_add_aux hf (hφm.sub hf))
  _ ≤ (∫⁻ a, f a ∂μ) + ∫⁻ a, g a ∂μ :=
    add_le_add_left (lintegral_mono fun a => tsub_le_iff_left.2 <| hφ_le a) _
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.898603
γ : Type ?u.898606
δ : Type ?u.898609
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : Measurable f
g φ : α → ℝ≥0∞
hφm : Measurable φ
hφ_le : φ ≤ fun a => f a + g a
hφ_eq : (∫⁻ (a : α), f a + g a ∂μ) = ∫⁻ (a : α), φ a ∂μ
⊢ (∫⁻ (a : α), f a + g a ∂μ) ≤ (∫⁻ (a : α), f a ∂μ) + ∫⁻ (a : α), g a ∂μ
Theorem: Nat.le_half_of_half_lt_sub
File: Mathlib/Data/Nat/Order/Basic.lean

tactic: rw [Nat.le_div_iff_mul_le two_pos]
state_before: m n k l a b : ℕ
h : a / 2 < a - b
⊢ b ≤ a / 2

tactic: rw [Nat.div_lt_iff_lt_mul two_pos, Nat.mul_sub_right_distrib, lt_tsub_iff_right, mul_two a] at h
state_before: m n k l a b : ℕ
h : a / 2 < a - b
⊢ b * 2 ≤ a

tactic: exact le_of_lt (Nat.lt_of_add_lt_add_left h)
state_before: m n k l a b : ℕ
h✝ : a < a * 2 - b * 2
h : a + b * 2 < a + a
⊢ b * 2 ≤ a
Theorem: WithTop.preimage_coe_Iio_top
File: Mathlib/Data/Set/Intervals/WithBotTop.lean

tactic: rw [← range_coe, preimage_range]
state_before: α : Type u_1
inst✝ : PartialOrder α
a b : α
⊢ some ⁻¹' Iio ⊤ = univ
Theorem: Commute.left_comm
File: Mathlib/Algebra/Group/Commute.lean

tactic: simp only [← mul_assoc, h.eq]
state_before: G : Type ?u.2631
S : Type u_1
inst✝ : Semigroup S
a b c✝ : S
h : Commute a b
c : S
⊢ a * (b * c) = b * (a * c)
Theorem: MeasureTheory.setToFun_add
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: rw [setToFun_eq hT (hf.add hg), setToFun_eq hT hf, setToFun_eq hT hg, Integrable.toL1_add,
  (L1.setToL1 hT).map_add]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1404218
G : Type ?u.1404221
𝕜 : Type ?u.1404224
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f g : α → E
hT : DominatedFinMeasAdditive μ T C
hf : Integrable f
hg : Integrable g
⊢ setToFun μ T hT (f + g) = setToFun μ T hT f + setToFun μ T hT g
Theorem: CategoryTheory.IsPushout.IsVanKampen.mono_of_mono_left
File: Mathlib/CategoryTheory/Adhesive.lean

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : IsVanKampen H
⊢ g ≫ 𝟙 Y = 𝟙 W ≫ g

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : IsVanKampen H
⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : IsVanKampen H
⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y
Theorem: stdSimplex_eq_inter
File: Mathlib/Analysis/Convex/Basic.lean

tactic: ext f
state_before: 𝕜 : Type u_1
E : Type ?u.288872
F : Type ?u.288875
β : Type ?u.288878
ι : Type u_2
inst✝¹ : OrderedSemiring 𝕜
inst✝ : Fintype ι
⊢ stdSimplex 𝕜 ι = (⋂ (x : ι), {f | 0 ≤ f x}) ∩ {f | ∑ x : ι, f x = 1}

tactic: simp only [stdSimplex, Set.mem_inter_iff, Set.mem_iInter, Set.mem_setOf_eq]
state_before: case h
𝕜 : Type u_1
E : Type ?u.288872
F : Type ?u.288875
β : Type ?u.288878
ι : Type u_2
inst✝¹ : OrderedSemiring 𝕜
inst✝ : Fintype ι
f : ι → 𝕜
⊢ f ∈ stdSimplex 𝕜 ι ↔ f ∈ (⋂ (x : ι), {f | 0 ≤ f x}) ∩ {f | ∑ x : ι, f x = 1}
Theorem: List.getLast?_isSome
File: Mathlib/Data/List/Basic.lean

tactic: simp
state_before: ι : Type ?u.34657
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
⊢ Option.isSome (getLast? []) = true ↔ [] ≠ []

tactic: simp
state_before: ι : Type ?u.34657
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a : α
⊢ Option.isSome (getLast? [a]) = true ↔ [a] ≠ []

tactic: simp [@getLast?_isSome (b :: l)]
state_before: ι : Type ?u.34657
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
⊢ Option.isSome (getLast? (a :: b :: l)) = true ↔ a :: b :: l ≠ []
Theorem: Filter.IsBasis.hasBasis
File: Mathlib/Order/Filter/Bases.lean

tactic: simp only [h.mem_filter_iff, exists_prop]
state_before: α : Type u_1
β : Type ?u.12014
γ : Type ?u.12017
ι : Sort u_2
ι' : Sort ?u.12023
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
h : IsBasis p s
t : Set α
⊢ t ∈ IsBasis.filter h ↔ ∃ i, p i ∧ s i ⊆ t
Theorem: ZMod.cast_mul
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n : ℕ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ n
a b : ZMod n
⊢ ↑(a * b) = ↑a * ↑b

tactic: symm
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ Nat.succ n✝
a b : ZMod (Nat.succ n✝)
⊢ ↑(a * b) = ↑a * ↑b

tactic: dsimp [ZMod, ZMod.cast]
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ Nat.succ n✝
a b : ZMod (Nat.succ n✝)
⊢ ↑a * ↑b = ↑(a * b)

tactic: erw [← Nat.cast_mul, ← sub_eq_zero, ← Nat.cast_sub (Nat.mod_le _ _),
  @CharP.cast_eq_zero_iff R _ m]
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ Nat.succ n✝
a b : ZMod (Nat.succ n✝)
⊢ ↑(val a) * ↑(val b) = ↑(val (a * b))

tactic: exact h.trans (Nat.dvd_sub_mod _)
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ Nat.succ n✝
a b : ZMod (Nat.succ n✝)
⊢ m ∣ val a * val b - val a * val b % Nat.succ n✝

tactic: apply Int.cast_mul
state_before: case zero
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ Nat.zero
a b : ZMod Nat.zero
⊢ ↑(a * b) = ↑a * ↑b
Theorem: Real.sin_neg
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [sin, exp_neg, (neg_div _ _).symm, add_mul]
state_before: x y : ℝ
⊢ sin (-x) = -sin x
Theorem: Setoid.eq_top_iff
File: Mathlib/Data/Setoid/Basic.lean

tactic: rw [_root_.eq_top_iff, Setoid.le_def, Setoid.top_def]
state_before: α : Type u_1
β : Type ?u.6005
s : Setoid α
⊢ s = ⊤ ↔ ∀ (x y : α), Rel s x y

tactic: simp only [Pi.top_apply, Prop.top_eq_true, forall_true_left]
state_before: α : Type u_1
β : Type ?u.6005
s : Setoid α
⊢ (∀ {x y : α}, ⊤ x y → Rel s x y) ↔ ∀ (x y : α), Rel s x y
Theorem: JordanHolderLattice.isMaximal_inf_right_of_isMaximal_sup
File: Mathlib/Order/JordanHolder.lean

tactic: rw [inf_comm]
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
x y : X
hxz : IsMaximal x (x ⊔ y)
hyz : IsMaximal y (x ⊔ y)
⊢ IsMaximal (x ⊓ y) y

tactic: rw [sup_comm] at hxz hyz
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
x y : X
hxz : IsMaximal x (x ⊔ y)
hyz : IsMaximal y (x ⊔ y)
⊢ IsMaximal (y ⊓ x) y

tactic: exact isMaximal_inf_left_of_isMaximal_sup hyz hxz
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
x y : X
hxz : IsMaximal x (y ⊔ x)
hyz : IsMaximal y (y ⊔ x)
⊢ IsMaximal (y ⊓ x) y
Theorem: List.zipWithLeft'_eq_zipWithLeft'TR
File: Std/Data/List/Basic.lean

tactic: funext α β γ f as bs
state_before: ⊢ @zipWithLeft' = @zipWithLeft'TR

tactic: simp [zipWithLeft'TR]
state_before: case h.h.h.h.h.h
α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs : List β
⊢ zipWithLeft' f as bs = zipWithLeft'TR f as bs

tactic: let rec go (acc) : ∀ as bs, zipWithLeft'TR.go f as bs acc =
    let (l, r) := as.zipWithLeft' f bs; (acc.toList ++ l, r)
| [], bs => by simp [zipWithLeft'TR.go]
| _::_, [] => by simp [zipWithLeft'TR.go, Array.foldl_data_eq_map]
| a::as, b::bs => by simp [zipWithLeft'TR.go, go _ as bs]
state_before: case h.h.h.h.h.h
α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs : List β
⊢ zipWithLeft' f as bs = zipWithLeft'TR.go f as bs #[]

tactic: simp [zipWithLeft'TR, go]
state_before: case h.h.h.h.h.h
α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs : List β
⊢ zipWithLeft' f as bs = zipWithLeft'TR.go f as bs #[]

tactic: simp [zipWithLeft'TR.go]
state_before: α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs✝ : List β
acc : Array γ
bs : List β
⊢ zipWithLeft'TR.go f [] bs acc =
    match zipWithLeft' f [] bs with
    | (l, r) => (Array.toList acc ++ l, r)

tactic: simp [zipWithLeft'TR.go, Array.foldl_data_eq_map]
state_before: α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs : List β
acc : Array γ
head✝ : α
tail✝ : List α
⊢ zipWithLeft'TR.go f (head✝ :: tail✝) [] acc =
    match zipWithLeft' f (head✝ :: tail✝) [] with
    | (l, r) => (Array.toList acc ++ l, r)

tactic: simp [zipWithLeft'TR.go, go _ as bs]
state_before: α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as✝ : List α
bs✝ : List β
acc : Array γ
a : α
as : List α
b : β
bs : List β
⊢ zipWithLeft'TR.go f (a :: as) (b :: bs) acc =
    match zipWithLeft' f (a :: as) (b :: bs) with
    | (l, r) => (Array.toList acc ++ l, r)
Theorem: Real.sin_pos_of_pos_of_le_two
File: Mathlib/Data/Complex/Exponential.lean

tactic: norm_num
state_before: x : ℝ
hx0 : 0 < x
hx : x ≤ 2
⊢ 0 < 2

tactic: simpa
state_before: x : ℝ
hx0 : 0 < x
hx : x ≤ 2
⊢ x ≤ 1 * 2

tactic: norm_num
state_before: x : ℝ
hx0 : 0 < x
hx : x ≤ 2
this : x / 2 ≤ 1
⊢ 0 < 2

tactic: rwa [_root_.abs_of_nonneg (le_of_lt (half_pos hx0))]
state_before: x : ℝ
hx0 : 0 < x
hx : x ≤ 2
this : x / 2 ≤ 1
⊢ abs' (x / 2) ≤ 1

tactic: rw [← sin_two_mul, two_mul, add_halves]
state_before: x : ℝ
hx0 : 0 < x
hx : x ≤ 2
this : x / 2 ≤ 1
⊢ 2 * sin (x / 2) * cos (x / 2) = sin x
Theorem: hasFDerivAt_of_restrictScalars
File: Mathlib/Analysis/Calculus/FDeriv/RestrictScalars.lean

tactic: rw [← H] at h
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
𝕜' : Type u_4
inst✝⁹ : NontriviallyNormedField 𝕜'
inst✝⁸ : NormedAlgebra 𝕜 𝕜'
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedSpace 𝕜' E
inst✝⁴ : IsScalarTower 𝕜 𝕜' E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
f : E → F
f' : E →L[𝕜'] F
s : Set E
x : E
g' : E →L[𝕜] F
h : HasFDerivAt f g' x
H : restrictScalars 𝕜 f' = g'
⊢ HasFDerivAt f f' x

tactic: exact h
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
𝕜' : Type u_4
inst✝⁹ : NontriviallyNormedField 𝕜'
inst✝⁸ : NormedAlgebra 𝕜 𝕜'
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedSpace 𝕜' E
inst✝⁴ : IsScalarTower 𝕜 𝕜' E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
f : E → F
f' : E →L[𝕜'] F
s : Set E
x : E
g' : E →L[𝕜] F
h : HasFDerivAt f (restrictScalars 𝕜 f') x
H : restrictScalars 𝕜 f' = g'
⊢ HasFDerivAt f f' x
Theorem: nat_abs_sum_le
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: induction' s using Finset.induction_on with i s his IH
state_before: ι✝ : Type ?u.986696
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
ι : Type u_1
s : Finset ι
f : ι → ℤ
⊢ Int.natAbs (∑ i in s, f i) ≤ ∑ i in s, Int.natAbs (f i)

tactic: simp only [Finset.sum_empty, Int.natAbs_zero]
state_before: case empty
ι✝ : Type ?u.986696
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
ι : Type u_1
f : ι → ℤ
⊢ Int.natAbs (∑ i in ∅, f i) ≤ ∑ i in ∅, Int.natAbs (f i)

tactic: simp only [his, Finset.sum_insert, not_false_iff]
state_before: case insert
ι✝ : Type ?u.986696
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
ι : Type u_1
f : ι → ℤ
i : ι
s : Finset ι
his : ¬i ∈ s
IH : Int.natAbs (∑ i in s, f i) ≤ ∑ i in s, Int.natAbs (f i)
⊢ Int.natAbs (∑ i in insert i s, f i) ≤ ∑ i in insert i s, Int.natAbs (f i)

tactic: exact (Int.natAbs_add_le _ _).trans (add_le_add le_rfl IH)
state_before: case insert
ι✝ : Type ?u.986696
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
ι : Type u_1
f : ι → ℤ
i : ι
s : Finset ι
his : ¬i ∈ s
IH : Int.natAbs (∑ i in s, f i) ≤ ∑ i in s, Int.natAbs (f i)
⊢ Int.natAbs (f i + ∑ i in s, f i) ≤ Int.natAbs (f i) + ∑ i in s, Int.natAbs (f i)
Theorem: Int.log_of_right_le_zero
File: Mathlib/Data/Int/Log.lean

tactic: rw [log_of_right_le_one _ (hr.trans zero_le_one),
  Nat.clog_of_right_le_one ((Nat.ceil_eq_zero.mpr <| inv_nonpos.2 hr).trans_le zero_le_one),
  Int.ofNat_zero, neg_zero]
state_before: R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r : R
hr : r ≤ 0
⊢ log b r = 0
Theorem: isIntegral_leadingCoeff_smul
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: rw [aeval_def] at h
state_before: R : Type u_1
A : Type ?u.981430
B : Type ?u.981433
S : Type u_2
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : CommRing S
inst✝² : Algebra R A
inst✝¹ : Algebra R B
f : R →+* S
p : R[X]
x : S
inst✝ : Algebra R S
h : ↑(aeval x) p = 0
⊢ IsIntegral R (leadingCoeff p • x)

tactic: rw [Algebra.smul_def]
state_before: R : Type u_1
A : Type ?u.981430
B : Type ?u.981433
S : Type u_2
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : CommRing S
inst✝² : Algebra R A
inst✝¹ : Algebra R B
f : R →+* S
p : R[X]
x : S
inst✝ : Algebra R S
h : eval₂ (algebraMap R S) x p = 0
⊢ IsIntegral R (leadingCoeff p • x)

tactic: exact (algebraMap R S).isIntegralElem_leadingCoeff_mul p x h
state_before: R : Type u_1
A : Type ?u.981430
B : Type ?u.981433
S : Type u_2
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : CommRing S
inst✝² : Algebra R A
inst✝¹ : Algebra R B
f : R →+* S
p : R[X]
x : S
inst✝ : Algebra R S
h : eval₂ (algebraMap R S) x p = 0
⊢ IsIntegral R (↑(algebraMap R S) (leadingCoeff p) * x)