ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Multiset.sum_le_card_nsmul
File: Mathlib/Algebra/Order/BigOperators/Group/Multiset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : OrderedCommMonoid α
s✝ t : Multiset α
a : α
s : Multiset α
n : α
h : ∀ x ∈ s, x ≤ n
⊢ s.prod ≤ n ^ card s
state_after: case h
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : OrderedCommMonoid α
s t : Multiset α
a n : α
a✝ : List α
h : ∀ x ∈ ⟦a✝⟧, x ≤ n
⊢ prod ⟦a✝⟧ ≤ n ^ card ⟦a✝⟧
tactic: induction s using Quotient.inductionOn
state_before: case h
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : OrderedCommMonoid α
s t : Multiset α
a n : α
a✝ : List α
h : ∀ x ∈ ⟦a✝⟧, x ≤ n
⊢ prod ⟦a✝⟧ ≤ n ^ card ⟦a✝⟧
state_after: no goals
tactic: simpa using List.prod_le_pow_card _ _ h
Theorem: Finset.prod_mem_multiset
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
m : Multiset α
f : { x // x ∈ m } → β
g : α → β
hfg : ∀ (x : { x // x ∈ m }), f x = g ↑x
⊢ ∏ x : { x // x ∈ m }, f x = ∏ x ∈ m.toFinset, g x
state_after: no goals
tactic: refine prod_bij' (fun x _ ↦ x) (fun x hx ↦ ⟨x, Multiset.mem_toFinset.1 hx⟩) ?_ ?_ ?_ ?_ ?_ <;>
    simp [hfg]
Theorem: add_neg_nonpos_iff_le
File: Mathlib/Algebra/Order/Group/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c : α
⊢ a ≤ 1 * b ↔ a ≤ b
state_after: no goals
tactic: rw [one_mul]
Theorem: Set.Nontrivial.infsep_of_fintype
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
x y z : α
s t : Set α
inst✝¹ : DecidableEq α
inst✝ : Fintype ↑s
hs : s.Nontrivial
⊢ s.offDiag.toFinset.Nonempty
state_after: no goals
tactic: simpa
state_before: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
x y z : α
s t : Set α
inst✝¹ : DecidableEq α
inst✝ : Fintype ↑s
hs : s.Nontrivial
⊢ s.infsep = s.offDiag.toFinset.inf' ⋯ (uncurry dist)
state_after: no goals
tactic: classical rw [Set.infsep_of_fintype, dif_pos hs]
Theorem: lowerSemicontinuousWithinAt_iff_le_liminf
File: Mathlib/Topology/Semicontinuous.lean

Proof steps:
state_before: α : Type u_1
inst✝³ : TopologicalSpace α
β : Type u_2
inst✝² : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
γ : Type u_3
inst✝¹ : CompleteLinearOrder γ
inst✝ : DenselyOrdered γ
f : α → γ
⊢ LowerSemicontinuousWithinAt f s x ↔ f x ≤ liminf f (𝓝[s] x)
state_after: case mp
α : Type u_1
inst✝³ : TopologicalSpace α
β : Type u_2
inst✝² : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
γ : Type u_3
inst✝¹ : CompleteLinearOrder γ
inst✝ : DenselyOrdered γ
f : α → γ
⊢ LowerSemicontinuousWithinAt f s x → f x ≤ liminf f (𝓝[s] x)

case mpr
α : Type u_1
inst✝³ : TopologicalSpace α
β : Type u_2
inst✝² : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
γ : Type u_3
inst✝¹ : CompleteLinearOrder γ
inst✝ : DenselyOrdered γ
f : α → γ
⊢ f x ≤ liminf f (𝓝[s] x) → LowerSemicontinuousWithinAt f s x
tactic: constructor
state_before: case mpr
α : Type u_1
inst✝³ : TopologicalSpace α
β : Type u_2
inst✝² : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
γ : Type u_3
inst✝¹ : CompleteLinearOrder γ
inst✝ : DenselyOrdered γ
f : α → γ
⊢ f x ≤ liminf f (𝓝[s] x) → LowerSemicontinuousWithinAt f s x
state_after: no goals
tactic: exact fun hf y ylt => eventually_lt_of_lt_liminf (ylt.trans_le hf)
Theorem: Module.End_isUnit_apply_inv_apply_of_isUnit
File: Mathlib/Algebra/Module/LinearMap/End.lean

Proof steps:
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
S : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
N : Type u_9
N₁ : Type u_10
N₂ : Type u_11
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommGroup N₁
inst✝⁴ : Module R M
inst✝³ : Module R N₁
inst✝² : Monoid S
inst✝¹ : DistribMulAction S M
inst✝ : SMulCommClass R S M
f : Module.End R M
h : IsUnit f
x : M
⊢ (f * h.unit.inv) x = x
state_after: no goals
tactic: simp
Theorem: CircleDeg1Lift.translationNumber_of_map_pow_eq_add_int
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

Proof steps:
state_before: f g : CircleDeg1Lift
x : ℝ
n : ℕ
m : ℤ
h : (f ^ n) x = x + ↑m
hn : 0 < n
⊢ τ f = ↑m / ↑n
state_after: f g : CircleDeg1Lift
x : ℝ
n : ℕ
m : ℤ
h : (f ^ n) x = x + ↑m
hn : 0 < n
this : τ (f ^ n) = ↑m
⊢ τ f = ↑m / ↑n
tactic: have := (f ^ n).translationNumber_of_eq_add_int h
state_before: f g : CircleDeg1Lift
x : ℝ
n : ℕ
m : ℤ
h : (f ^ n) x = x + ↑m
hn : 0 < n
this : τ (f ^ n) = ↑m
⊢ τ f = ↑m / ↑n
state_after: f g : CircleDeg1Lift
x : ℝ
n : ℕ
m : ℤ
h : (f ^ n) x = x + ↑m
hn : 0 < n
this : τ f * ↑n = ↑m
⊢ ↑n ≠ 0
tactic: rwa [translationNumber_pow, mul_comm, ← eq_div_iff] at this
state_before: f g : CircleDeg1Lift
x : ℝ
n : ℕ
m : ℤ
h : (f ^ n) x = x + ↑m
hn : 0 < n
this : τ f * ↑n = ↑m
⊢ ↑n ≠ 0
state_after: no goals
tactic: exact Nat.cast_ne_zero.2 (ne_of_gt hn)
Theorem: Nat.sum_primeFactors_gcd_add_sum_primeFactors_mul
File: Mathlib/Data/Nat/Factorization/Basic.lean

Proof steps:
state_before: a b m✝ n✝ p : ℕ
β : Type u_1
inst✝ : CommMonoid β
m n : ℕ
f : ℕ → β
⊢ (m.gcd n).primeFactors.prod f * (m * n).primeFactors.prod f = m.primeFactors.prod f * n.primeFactors.prod f
state_after: case inl
a b m n✝ p : ℕ
β : Type u_1
inst✝ : CommMonoid β
n : ℕ
f : ℕ → β
⊢ (gcd 0 n).primeFactors.prod f * (0 * n).primeFactors.prod f = (primeFactors 0).prod f * n.primeFactors.prod f

case inr
a b m✝ n✝ p : ℕ
β : Type u_1
inst✝ : CommMonoid β
m n : ℕ
f : ℕ → β
hm₀ : m ≠ 0
⊢ (m.gcd n).primeFactors.prod f * (m * n).primeFactors.prod f = m.primeFactors.prod f * n.primeFactors.prod f
tactic: obtain rfl | hm₀ := eq_or_ne m 0
state_before: case inr
a b m✝ n✝ p : ℕ
β : Type u_1
inst✝ : CommMonoid β
m n : ℕ
f : ℕ → β
hm₀ : m ≠ 0
⊢ (m.gcd n).primeFactors.prod f * (m * n).primeFactors.prod f = m.primeFactors.prod f * n.primeFactors.prod f
state_after: case inr.inl
a b m✝ n p : ℕ
β : Type u_1
inst✝ : CommMonoid β
m : ℕ
f : ℕ → β
hm₀ : m ≠ 0
⊢ (m.gcd 0).primeFactors.prod f * (m * 0).primeFactors.prod f = m.primeFactors.prod f * (primeFactors 0).prod f

case inr.inr
a b m✝ n✝ p : ℕ
β : Type u_1
inst✝ : CommMonoid β
m n : ℕ
f : ℕ → β
hm₀ : m ≠ 0
hn₀ : n ≠ 0
⊢ (m.gcd n).primeFactors.prod f * (m * n).primeFactors.prod f = m.primeFactors.prod f * n.primeFactors.prod f
tactic: obtain rfl | hn₀ := eq_or_ne n 0
Theorem: List.getLast?_append_of_ne_nil
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁✝ l₂ l₁ : List α
hl₂ : [] ≠ []
⊢ (l₁ ++ []).getLast? = [].getLast?
state_after: no goals
tactic: contradiction
Theorem: jacobiSym.value_at
File: Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean

Proof steps:
state_before: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ J(a | b) = χ ↑b
state_after: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ J(a | b) = (List.map (⇑χ) (List.map Nat.cast b.primeFactorsList)).prod
tactic: conv_rhs => rw [← prod_primeFactorsList hb.pos.ne', cast_list_prod, map_list_prod χ]
state_before: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ J(a | b) = (List.map (⇑χ) (List.map Nat.cast b.primeFactorsList)).prod
state_after: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ (List.pmap (fun p pp => legendreSym p a) b.primeFactorsList ⋯).prod =
    (List.pmap (fun a x => (⇑χ ∘ Nat.cast) a) b.primeFactorsList ⋯).prod
tactic: rw [jacobiSym, List.map_map, ← List.pmap_eq_map Nat.Prime _ _
    fun _ => prime_of_mem_primeFactorsList]
state_before: a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ (List.pmap (fun p pp => legendreSym p a) b.primeFactorsList ⋯).prod =
    (List.pmap (fun a x => (⇑χ ∘ Nat.cast) a) b.primeFactorsList ⋯).prod
state_after: case e_a
a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ List.pmap (fun p pp => legendreSym p a) b.primeFactorsList ⋯ =
    List.pmap (fun a x => (⇑χ ∘ Nat.cast) a) b.primeFactorsList ⋯
tactic: congr 1
state_before: case e_a
a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ List.pmap (fun p pp => legendreSym p a) b.primeFactorsList ⋯ =
    List.pmap (fun a x => (⇑χ ∘ Nat.cast) a) b.primeFactorsList ⋯
state_after: case e_a.h
a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ ∀ a_1 ∈ b.primeFactorsList, ∀ (h₁ : Nat.Prime a_1), Nat.Prime a_1 → legendreSym a_1 a = (⇑χ ∘ Nat.cast) a_1
tactic: apply List.pmap_congr
state_before: case e_a.h
a : ℤ
R : Type u_1
inst✝ : CommSemiring R
χ : R →* ℤ
hp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = χ ↑p
b : ℕ
hb : Odd b
⊢ ∀ a_1 ∈ b.primeFactorsList, ∀ (h₁ : Nat.Prime a_1), Nat.Prime a_1 → legendreSym a_1 a = (⇑χ ∘ Nat.cast) a_1
state_after: no goals
tactic: exact fun p h pp _ => hp p pp (hb.ne_two_of_dvd_nat <| dvd_of_mem_primeFactorsList h)
Theorem: interior_sInter
File: Mathlib/Topology/AlexandrovDiscrete.lean

Proof steps:
state_before: ι : Sort u_1
κ : ι → Sort u_2
α : Type u_3
β : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : AlexandrovDiscrete α
S✝ : Set (Set α)
f : ι → Set α
S : Set (Set α)
⊢ interior (⋂₀ S) = ⋂ s ∈ S, interior s
state_after: no goals
tactic: simp_rw [sInter_eq_biInter, interior_iInter]
Theorem: Pi.uniformSpace_comap_precomp'
File: Mathlib/Topology/UniformSpace/Pi.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
β : Type u_3
α : ι → Type u
U : (i : ι) → UniformSpace (α i)
inst✝ : UniformSpace β
φ : ι' → ι
⊢ UniformSpace.comap (fun g i' => g (φ i')) (uniformSpace fun i' => α (φ i')) =
    ⨅ i', UniformSpace.comap (eval (φ i')) (U (φ i'))
state_after: no goals
tactic: simp [Pi.uniformSpace_eq, UniformSpace.comap_iInf, ← UniformSpace.comap_comap, comp]
Theorem: ProbabilityTheory.setLIntegral_condKernel
File: Mathlib/Probability/Kernel/Disintegration/Integral.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : Kernel α (β × Ω)
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
hf : Measurable f
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β) in s, ∫⁻ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a = ∫⁻ (x : β × Ω) in s ×ˢ t, f x ∂κ a
state_after: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : Kernel α (β × Ω)
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
hf : Measurable f
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β) in s, ∫⁻ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a =
    ∫⁻ (x : β × Ω) in s ×ˢ t, f x ∂(κ.fst ⊗ₖ κ.condKernel) a
tactic: conv_rhs => rw [← κ.disintegrate κ.condKernel]
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : CountableOrCountablyGenerated α β
κ : Kernel α (β × Ω)
inst✝ : IsFiniteKernel κ
f : β × Ω → ℝ≥0∞
hf : Measurable f
a : α
s : Set β
hs : MeasurableSet s
t : Set Ω
ht : MeasurableSet t
⊢ ∫⁻ (b : β) in s, ∫⁻ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a =
    ∫⁻ (x : β × Ω) in s ×ˢ t, f x ∂(κ.fst ⊗ₖ κ.condKernel) a
state_after: no goals
tactic: rw [Kernel.setLIntegral_compProd _ _ _ hf hs ht]
Theorem: Filter.tendsto_Iic_atBot
File: Mathlib/Order/Filter/AtTopBot.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : SemilatticeInf α
a : α
f : β → ↑(Iic a)
l : Filter β
⊢ Tendsto f l atBot ↔ Tendsto (fun x => ↑(f x)) l atBot
state_after: no goals
tactic: rw [atBot_Iic_eq, tendsto_comap_iff, Function.comp_def]
Theorem: Int.even_add'
File: Mathlib/Algebra/Ring/Int.lean

Proof steps:
state_before: m n : ℤ
⊢ Even (m + n) ↔ (Odd m ↔ Odd n)
state_after: no goals
tactic: rw [even_add, even_iff_not_odd, even_iff_not_odd, not_iff_not]
Theorem: AddMonoid.Coprod.con_add_left_neg
File: Mathlib/GroupTheory/Coprod/Basic.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
inst✝¹ : Group G
inst✝ : Group H
x : FreeMonoid (G ⊕ H)
⊢ (coprodCon G H) (ofList (List.map (Sum.map Inv.inv Inv.inv) (toList x)).reverse * x) 1
state_after: G : Type u_1
H : Type u_2
inst✝¹ : Group G
inst✝ : Group H
x : FreeMonoid (G ⊕ H)
⊢ mk (ofList (List.map (Sum.map Inv.inv Inv.inv) (toList x)).reverse) * mk x = 1
tactic: rw [← mk_eq_mk, map_mul, map_one]
state_before: G : Type u_1
H : Type u_2
inst✝¹ : Group G
inst✝ : Group H
x : FreeMonoid (G ⊕ H)
⊢ mk (ofList (List.map (Sum.map Inv.inv Inv.inv) (toList x)).reverse) * mk x = 1
state_after: no goals
tactic: induction x with
  | h0 => simp [map_one mk] -- TODO: fails without `[map_one mk]`
  | ih x xs ihx =>
    simp only [toList_of_mul, map_cons, reverse_cons, ofList_append, map_mul, ihx, ofList_singleton]
    rwa [mul_assoc, ← mul_assoc (mk (of _)), mk_of_inv_mul, one_mul]
Theorem: Stream'.WSeq.think_congr
File: Mathlib/Data/Seq/WSeq.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
s t : WSeq α
h : s ~ʷ t
⊢ s.think ~ʷ t.think
state_after: α : Type u
β : Type v
γ : Type w
s t : WSeq α
h : s ~ʷ t
⊢ LiftRel (fun x x_1 => x = x_1) s.think t.think
tactic: unfold Equiv
state_before: α : Type u
β : Type v
γ : Type w
s t : WSeq α
h : s ~ʷ t
⊢ LiftRel (fun x x_1 => x = x_1) s.think t.think
state_after: no goals
tactic: simpa using h
Theorem: Set.Icc_union_Icc
File: Mathlib/Order/Interval/Set/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : min a b < max c d
h₂ : min c d < max a b
⊢ Icc a b ∪ Icc c d = Icc (min a c) (max b d)
state_after: case inl.inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : a ≤ b
hcd : c ≤ d
h₁ : a < d
h₂ : c < b
⊢ Icc a b ∪ Icc c d = Icc (min a c) (max b d)

case inl.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : a ≤ b
hcd : d < c
h₁ : a < c
h₂ : d < b
⊢ Icc a b ∪ Icc c d = Icc (min a c) (max b d)

case inr.inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : b < a
hcd : c ≤ d
h₁ : b < d
h₂ : c < a
⊢ Icc a b ∪ Icc c d = Icc (min a c) (max b d)

case inr.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : b < a
hcd : d < c
h₁ : b < c
h₂ : d < a
⊢ Icc a b ∪ Icc c d = Icc (min a c) (max b d)
tactic: rcases le_or_lt a b with hab | hab <;> rcases le_or_lt c d with hcd | hcd <;>
    simp only [min_eq_left, min_eq_right, max_eq_left, max_eq_right, min_eq_left_of_lt,
      min_eq_right_of_lt, max_eq_left_of_lt, max_eq_right_of_lt, hab, hcd] at h₁ h₂
state_before: case inl.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : a ≤ b
hcd : d < c
h₁ : a < c
h₂ : d < b
⊢ Icc a b ∪ Icc c d = Icc (min a c) (max b d)

case inr.inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : b < a
hcd : c ≤ d
h₁ : b < d
h₂ : c < a
⊢ Icc a b ∪ Icc c d = Icc (min a c) (max b d)

case inr.inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : b < a
hcd : d < c
h₁ : b < c
h₂ : d < a
⊢ Icc a b ∪ Icc c d = Icc (min a c) (max b d)
state_after: no goals
tactic: all_goals simp [*, min_eq_left_of_lt, max_eq_left_of_lt, min_eq_right_of_lt, max_eq_right_of_lt]
Theorem: Algebra.discr_of_matrix_vecMul
File: Mathlib/RingTheory/Discriminant.lean

Proof steps:
state_before: A : Type u
B : Type v
C : Type z
ι : Type w
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : CommRing C
inst✝³ : Algebra A C
ι' : Type u_1
inst✝² : Fintype ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι'
b : ι → B
P : Matrix ι ι A
⊢ discr A (b ᵥ* P.map ⇑(algebraMap A B)) = P.det ^ 2 * discr A b
state_after: no goals
tactic: rw [discr_def, traceMatrix_of_matrix_vecMul, det_mul, det_mul, det_transpose, mul_comm, ←
    mul_assoc, discr_def, pow_two]
Theorem: List.Perm.append_right
File: .lake/packages/batteries/Batteries/Data/List/Perm.lean

Proof steps:
state_before: α : Type u_1
l₁ l₂ t₁ : List α
p : l₁ ~ l₂
⊢ l₁ ++ t₁ ~ l₂ ++ t₁
state_after: no goals
tactic: induction p with
  | nil => rfl
  | cons _ _ ih => exact cons _ ih
  | swap => exact swap ..
  | trans _ _ ih₁ ih₂ => exact trans ih₁ ih₂
Theorem: Nat.divisorsAntidiagonal_zero
File: Mathlib/NumberTheory/Divisors.lean

Proof steps:
state_before: n : ℕ
⊢ divisorsAntidiagonal 0 = ∅
state_after: case a
n : ℕ
a✝ : ℕ × ℕ
⊢ a✝ ∈ divisorsAntidiagonal 0 ↔ a✝ ∈ ∅
tactic: ext
state_before: case a
n : ℕ
a✝ : ℕ × ℕ
⊢ a✝ ∈ divisorsAntidiagonal 0 ↔ a✝ ∈ ∅
state_after: no goals
tactic: simp
Theorem: EMetric.hausdorffEdist_le_of_mem_edist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
r : ℝ≥0∞
H1 : ∀ x ∈ s, ∃ y ∈ t, edist x y ≤ r
H2 : ∀ x ∈ t, ∃ y ∈ s, edist x y ≤ r
⊢ hausdorffEdist s t ≤ r
state_after: case refine_1
ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y : α
s t u : Set α
Φ : α → β
r : ℝ≥0∞
H1 : ∀ x ∈ s, ∃ y ∈ t, edist x y ≤ r
H2 : ∀ x ∈ t, ∃ y ∈ s, edist x y ≤ r
x : α
xs : x ∈ s
⊢ infEdist x t ≤ r

case refine_2
ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y : α
s t u : Set α
Φ : α → β
r : ℝ≥0∞
H1 : ∀ x ∈ s, ∃ y ∈ t, edist x y ≤ r
H2 : ∀ x ∈ t, ∃ y ∈ s, edist x y ≤ r
x : α
xt : x ∈ t
⊢ infEdist x s ≤ r
tactic: refine hausdorffEdist_le_of_infEdist (fun x xs ↦ ?_) (fun x xt ↦ ?_)
Theorem: QuotientGroup.subgroup_eq_top_of_subsingleton
File: Mathlib/GroupTheory/QuotientGroup.lean

Proof steps:
state_before: G : Type u
inst✝² : Group G
N : Subgroup G
nN : N.Normal
H✝ : Type v
inst✝¹ : Group H✝
M : Type x
inst✝ : Monoid M
φ : G →* H✝
H : Subgroup G
h : Subsingleton (G ⧸ H)
x : G
x✝ : x ∈ ⊤
⊢ x ∈ H
state_after: G : Type u
inst✝² : Group G
N : Subgroup G
nN : N.Normal
H✝ : Type v
inst✝¹ : Group H✝
M : Type x
inst✝ : Monoid M
φ : G →* H✝
H : Subgroup G
h : Subsingleton (G ⧸ H)
x : G
x✝ : x ∈ ⊤
this : 1⁻¹ * x ∈ H
⊢ x ∈ H
tactic: have this : 1⁻¹ * x ∈ H := QuotientGroup.eq.1 (Subsingleton.elim _ _)
state_before: G : Type u
inst✝² : Group G
N : Subgroup G
nN : N.Normal
H✝ : Type v
inst✝¹ : Group H✝
M : Type x
inst✝ : Monoid M
φ : G →* H✝
H : Subgroup G
h : Subsingleton (G ⧸ H)
x : G
x✝ : x ∈ ⊤
this : 1⁻¹ * x ∈ H
⊢ x ∈ H
state_after: no goals
tactic: rwa [inv_one, one_mul] at this
Theorem: Complex.logTaylor_succ
File: Mathlib/Analysis/SpecialFunctions/Complex/LogBounds.lean

Proof steps:
state_before: n : ℕ
⊢ logTaylor (n + 1) = logTaylor n + fun z => (-1) ^ (n + 1) * z ^ n / ↑n
state_after: case h
n : ℕ
x✝ : ℂ
⊢ logTaylor (n + 1) x✝ = (logTaylor n + fun z => (-1) ^ (n + 1) * z ^ n / ↑n) x✝
tactic: funext
state_before: case h
n : ℕ
x✝ : ℂ
⊢ logTaylor (n + 1) x✝ = (logTaylor n + fun z => (-1) ^ (n + 1) * z ^ n / ↑n) x✝
state_after: no goals
tactic: simpa only [logTaylor] using Finset.sum_range_succ ..
Theorem: Complex.cos_add_sin_I
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x y : ℂ
⊢ cos x + sin x * I = cexp (x * I)
state_after: no goals
tactic: rw [← cosh_add_sinh, sinh_mul_I, cosh_mul_I]
Theorem: Finset.sup'_inf_sup'
File: Mathlib/Data/Finset/Lattice.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : DistribLattice α
s : Finset ι
t : Finset κ
hs : s.Nonempty
ht : t.Nonempty
f✝ : ι → α
g✝ : κ → α
a : α
f : ι → α
g : κ → α
⊢ s.sup' hs f ⊓ t.sup' ht g = (s ×ˢ t).sup' ⋯ fun i => f i.1 ⊓ g i.2
state_after: no goals
tactic: simp_rw [Finset.sup'_inf_distrib_right, Finset.sup'_inf_distrib_left, sup'_product_left]
Theorem: Ring.multichoose_one
File: Mathlib/RingTheory/Binomial.lean

Proof steps:
state_before: R✝ : Type u_1
inst✝⁶ : AddCommMonoid R✝
inst✝⁵ : Pow R✝ ℕ
inst✝⁴ : BinomialRing R✝
R : Type u_2
inst✝³ : NonAssocSemiring R
inst✝² : Pow R ℕ
inst✝¹ : NatPowAssoc R
inst✝ : BinomialRing R
k : ℕ
⊢ multichoose 1 k = 1
state_after: no goals
tactic: induction k with
  | zero => exact multichoose_zero_right 1
  | succ n ih =>
    rw [show (1 : R) = 0 + 1 by exact (@zero_add R _ 1).symm, multichoose_succ_succ,
      multichoose_zero_succ, zero_add, zero_add, ih]
Theorem: inv_nonneg
File: Mathlib/Algebra/Order/Field/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u_1
inst✝³ : Semifield α
inst✝² : LinearOrder α
inst✝¹ : PosMulReflectLT α
inst✝ : ZeroLEOneClass α
a b : α
⊢ 0 ≤ a⁻¹ ↔ 0 ≤ a
state_after: no goals
tactic: simp only [le_iff_eq_or_lt, inv_pos, zero_eq_inv]
Theorem: LucasLehmer.X.ω_mul_ωb
File: Mathlib/NumberTheory/LucasLehmer.lean

Proof steps:
state_before: q✝ q : ℕ+
⊢ ω * ωb = 1
state_after: q✝ q : ℕ+
⊢ (2, 1) * (2, -1) = 1
tactic: dsimp [ω, ωb]
state_before: q✝ q : ℕ+
⊢ (2, 1) * (2, -1) = 1
state_after: case h₁
q✝ q : ℕ+
⊢ 2 * 2 + -3 = 1
tactic: ext <;> simp
state_before: case h₁
q✝ q : ℕ+
⊢ 2 * 2 + -3 = 1
state_after: no goals
tactic: ring
Theorem: WittVector.coeff_truncateFun
File: Mathlib/RingTheory/WittVector/Truncated.lean

Proof steps:
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
R : Type u_1
x : 𝕎 R
i : Fin n
⊢ TruncatedWittVector.coeff i (truncateFun n x) = x.coeff ↑i
state_after: no goals
tactic: rw [truncateFun, TruncatedWittVector.coeff_mk]
Theorem: LSeries.convolution_map_zero
File: Mathlib/NumberTheory/LSeries/Convolution.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
f g : ℕ → R
⊢ (f ⍟ g) 0 = 0
state_after: no goals
tactic: simp only [convolution_def, divisorsAntidiagonal_zero, Finset.sum_empty]
Theorem: LinearMap.det_smul
File: Mathlib/LinearAlgebra/Determinant.lean

Proof steps:
state_before: R : Type u_1
inst✝¹² : CommRing R
M✝ : Type u_2
inst✝¹¹ : AddCommGroup M✝
inst✝¹⁰ : Module R M✝
M' : Type u_3
inst✝⁹ : AddCommGroup M'
inst✝⁸ : Module R M'
ι : Type u_4
inst✝⁷ : DecidableEq ι
inst✝⁶ : Fintype ι
e : Basis ι R M✝
A : Type u_5
inst✝⁵ : CommRing A
inst✝⁴ : Module A M✝
κ : Type u_6
inst✝³ : Fintype κ
𝕜 : Type u_7
inst✝² : Field 𝕜
M : Type u_8
inst✝¹ : AddCommGroup M
inst✝ : Module 𝕜 M
c : 𝕜
f : M →ₗ[𝕜] M
⊢ LinearMap.det (c • f) = c ^ FiniteDimensional.finrank 𝕜 M * LinearMap.det f
state_after: case pos
R : Type u_1
inst✝¹² : CommRing R
M✝ : Type u_2
inst✝¹¹ : AddCommGroup M✝
inst✝¹⁰ : Module R M✝
M' : Type u_3
inst✝⁹ : AddCommGroup M'
inst✝⁸ : Module R M'
ι : Type u_4
inst✝⁷ : DecidableEq ι
inst✝⁶ : Fintype ι
e : Basis ι R M✝
A : Type u_5
inst✝⁵ : CommRing A
inst✝⁴ : Module A M✝
κ : Type u_6
inst✝³ : Fintype κ
𝕜 : Type u_7
inst✝² : Field 𝕜
M : Type u_8
inst✝¹ : AddCommGroup M
inst✝ : Module 𝕜 M
c : 𝕜
f : M →ₗ[𝕜] M
H : ∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 M)
⊢ LinearMap.det (c • f) = c ^ FiniteDimensional.finrank 𝕜 M * LinearMap.det f

case neg
R : Type u_1
inst✝¹² : CommRing R
M✝ : Type u_2
inst✝¹¹ : AddCommGroup M✝
inst✝¹⁰ : Module R M✝
M' : Type u_3
inst✝⁹ : AddCommGroup M'
inst✝⁸ : Module R M'
ι : Type u_4
inst✝⁷ : DecidableEq ι
inst✝⁶ : Fintype ι
e : Basis ι R M✝
A : Type u_5
inst✝⁵ : CommRing A
inst✝⁴ : Module A M✝
κ : Type u_6
inst✝³ : Fintype κ
𝕜 : Type u_7
inst✝² : Field 𝕜
M : Type u_8
inst✝¹ : AddCommGroup M
inst✝ : Module 𝕜 M
c : 𝕜
f : M →ₗ[𝕜] M
H : ¬∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 M)
⊢ LinearMap.det (c • f) = c ^ FiniteDimensional.finrank 𝕜 M * LinearMap.det f
tactic: by_cases H : ∃ s : Finset M, Nonempty (Basis s 𝕜 M)
Theorem: Mathlib.Tactic.Abel.subst_into_add
File: Mathlib/Tactic/Abel.lean

Proof steps:
state_before: α : Type u_1
inst✝ : AddCommMonoid α
l r tl tr t : α
prl : l = tl
prr : r = tr
prt : tl + tr = t
⊢ l + r = t
state_after: no goals
tactic: rw [prl, prr, prt]