tasksource/leandojo huggingface dataset:
Theorem: tendsto_nat_floor_div_atTop
File: Mathlib/Analysis/SpecificLimits/Basic.lean

tactic: simpa using tendsto_nat_floor_mul_div_atTop (zero_le_one' R)
state_before: α : Type ?u.513601
β : Type ?u.513604
ι : Type ?u.513607
R : Type u_1
inst✝³ : TopologicalSpace R
inst✝² : LinearOrderedField R
inst✝¹ : OrderTopology R
inst✝ : FloorRing R
⊢ Tendsto (fun x => ↑⌊x⌋₊ / x) atTop (𝓝 1)
Theorem: Filter.lift_neBot_iff
File: Mathlib/Order/Filter/Lift.lean

tactic: simp only [neBot_iff, Ne.def, ← empty_mem_iff_bot, mem_lift_sets hm, not_exists, not_and]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.20338
ι : Sort ?u.20341
f f₁ f₂ : Filter α
g g₁ g₂ : Set α → Filter β
hm : Monotone g
⊢ NeBot (Filter.lift f g) ↔ ∀ (s : Set α), s ∈ f → NeBot (g s)
Theorem: CategoryTheory.Bicategory.rightUnitor_comp
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f : a ⟶ b
g : b ⟶ c
⊢ (ρ_ (f ≫ g)).hom = (α_ f g (𝟙 c)).hom ≫ f ◁ (ρ_ g).hom
Theorem: OrthonormalBasis.adjustToOrientation_apply_eq_or_eq_neg
File: Mathlib/Analysis/InnerProductSpace/Orientation.lean

tactic: simpa [← e.toBasis_adjustToOrientation] using
  e.toBasis.adjustToOrientation_apply_eq_or_eq_neg x i
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace ℝ E
ι : Type u_2
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
ne : Nonempty ι
e f : OrthonormalBasis ι ℝ E
x : Orientation ℝ E ι
i : ι
⊢ ↑(adjustToOrientation e x) i = ↑e i ∨ ↑(adjustToOrientation e x) i = -↑e i
Theorem: CategoryTheory.Functor.isSplitMono_iff
File: Mathlib/CategoryTheory/Functor/EpiMono.lean

tactic: constructor
state_before: C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
E : Type u₃
inst✝² : Category E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : Full F
inst✝ : Faithful F
⊢ IsSplitMono (F.map f) ↔ IsSplitMono f

tactic: intro h
state_before: case mp
C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
E : Type u₃
inst✝² : Category E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : Full F
inst✝ : Faithful F
⊢ IsSplitMono (F.map f) → IsSplitMono f

tactic: exact IsSplitMono.mk' ((splitMonoEquiv F f).invFun h.exists_splitMono.some)
state_before: case mp
C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
E : Type u₃
inst✝² : Category E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : Full F
inst✝ : Faithful F
h : IsSplitMono (F.map f)
⊢ IsSplitMono f

tactic: intro h
state_before: case mpr
C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
E : Type u₃
inst✝² : Category E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : Full F
inst✝ : Faithful F
⊢ IsSplitMono f → IsSplitMono (F.map f)

tactic: exact IsSplitMono.mk' ((splitMonoEquiv F f).toFun h.exists_splitMono.some)
state_before: case mpr
C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
E : Type u₃
inst✝² : Category E
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝¹ : Full F
inst✝ : Faithful F
h : IsSplitMono f
⊢ IsSplitMono (F.map f)
Theorem: Filter.limsup_const_bot
File: Mathlib/Order/LiminfLimsup.lean

tactic: rw [limsup_eq, eq_bot_iff]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.102493
ι : Type ?u.102496
inst✝ : CompleteLattice α
f : Filter β
⊢ limsup (fun x => ⊥) f = ⊥

tactic: exact sInf_le (eventually_of_forall fun _ => le_rfl)
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.102493
ι : Type ?u.102496
inst✝ : CompleteLattice α
f : Filter β
⊢ sInf {a | ∀ᶠ (n : β) in f, ⊥ ≤ a} ≤ ⊥
Theorem: AddLECancellable.tsub_eq_of_eq_add
File: Mathlib/Algebra/Order/Sub/Defs.lean

tactic: rw [h]
state_before: α : Type u_1
β : Type ?u.34353
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hb : AddLECancellable b
h : a = c + b
⊢ c ≤ a - b

tactic: exact hb.le_add_tsub
state_before: α : Type u_1
β : Type ?u.34353
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hb : AddLECancellable b
h : a = c + b
⊢ c ≤ c + b - b
Theorem: ENNReal.exists_nat_gt
File: Mathlib/Data/Real/ENNReal.lean

tactic: lift r to ℝ≥0 using h
state_before: α : Type ?u.131985
β : Type ?u.131988
a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
r : ℝ≥0∞
h : r ≠ ⊤
⊢ ∃ n, r < ↑n

tactic: rcases exists_nat_gt r with ⟨n, hn⟩
state_before: case intro
α : Type ?u.131985
β : Type ?u.131988
a b c d : ℝ≥0∞
r✝ p q r : ℝ≥0
⊢ ∃ n, ↑r < ↑n

tactic: exact ⟨n, coe_lt_coe_nat.2 hn⟩
state_before: case intro.intro
α : Type ?u.131985
β : Type ?u.131988
a b c d : ℝ≥0∞
r✝ p q r : ℝ≥0
n : ℕ
hn : r < ↑n
⊢ ∃ n, ↑r < ↑n
Theorem: CategoryTheory.Bicategory.associator_inv_naturality_left
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f f' : a ⟶ b
η : f ⟶ f'
g : b ⟶ c
h : c ⟶ d
⊢ η ▷ (g ≫ h) ≫ (α_ f' g h).inv = (α_ f g h).inv ≫ η ▷ g ▷ h
Theorem: Rat.mul_add
File: Mathlib/Data/Rat/Defs.lean

tactic: rw [Rat.mul_comm, Rat.add_mul, Rat.mul_comm, Rat.mul_comm c a]
state_before: a b c : ℚ
⊢ a * (b + c) = a * b + a * c
Theorem: ZMod.mul_inv_cancel_aux
File: Mathlib/Data/ZMod/Basic.lean

tactic: obtain ⟨k, rfl⟩ := nat_cast_zmod_surjective a
state_before: n a✝ p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
h : a ≠ 0
⊢ a * a⁻¹ = 1

tactic: apply coe_mul_inv_eq_one
state_before: case intro
n a p : ℕ
inst✝ : Fact (Nat.Prime p)
k : ℕ
h : ↑k ≠ 0
⊢ ↑k * (↑k)⁻¹ = 1

tactic: apply Nat.coprime.symm
state_before: case intro.h
n a p : ℕ
inst✝ : Fact (Nat.Prime p)
k : ℕ
h : ↑k ≠ 0
⊢ Nat.coprime k p

tactic: rwa [Nat.Prime.coprime_iff_not_dvd Fact.out, ← CharP.cast_eq_zero_iff (ZMod p)]
state_before: case intro.h.a
n a p : ℕ
inst✝ : Fact (Nat.Prime p)
k : ℕ
h : ↑k ≠ 0
⊢ Nat.coprime p k
Theorem: CauSeq.mul_limZero_right
File: Mathlib/Data/Real/CauSeq.lean

tactic: have := mul_lt_mul' (le_of_lt <| hF j) (H _ ij) (abv_nonneg abv _) F0
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : CauSeq β abv
hg : LimZero g
ε : α
ε0 : ε > 0
F : α
F0 : F > 0
hF : ∀ (i : ℕ), abv (↑f i) < F
i : ℕ
H : ∀ (j : ℕ), j ≥ i → abv (↑g j) < ε / F
j : ℕ
ij : j ≥ i
⊢ abv (↑(f * g) j) < ε

tactic: rwa [mul_comm F, div_mul_cancel _ (ne_of_gt F0), ← abv_mul] at this
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : CauSeq β abv
hg : LimZero g
ε : α
ε0 : ε > 0
F : α
F0 : F > 0
hF : ∀ (i : ℕ), abv (↑f i) < F
i : ℕ
H : ∀ (j : ℕ), j ≥ i → abv (↑g j) < ε / F
j : ℕ
ij : j ≥ i
this : abv (↑f j) * abv (↑g j) < F * (ε / F)
⊢ abv (↑(f * g) j) < ε
Theorem: Finite.card_eq_zero_of_surjective
File: Mathlib/Data/Finite/Card.lean

tactic: cases finite_or_infinite β
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.4320
f : α → β
hf : Function.Surjective f
h : Nat.card β = 0
⊢ Nat.card α = 0

tactic: haveI := card_eq_zero_iff.mp h
state_before: case inl
α : Type u_1
β : Type u_2
γ : Type ?u.4320
f : α → β
hf : Function.Surjective f
h : Nat.card β = 0
h✝ : Finite β
⊢ Nat.card α = 0

tactic: haveI := Function.isEmpty f
state_before: case inl
α : Type u_1
β : Type u_2
γ : Type ?u.4320
f : α → β
hf : Function.Surjective f
h : Nat.card β = 0
h✝ : Finite β
this : IsEmpty β
⊢ Nat.card α = 0

tactic: exact Nat.card_of_isEmpty
state_before: case inl
α : Type u_1
β : Type u_2
γ : Type ?u.4320
f : α → β
hf : Function.Surjective f
h : Nat.card β = 0
h✝ : Finite β
this✝ : IsEmpty β
this : IsEmpty α
⊢ Nat.card α = 0

tactic: haveI := Infinite.of_surjective f hf
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type ?u.4320
f : α → β
hf : Function.Surjective f
h : Nat.card β = 0
h✝ : Infinite β
⊢ Nat.card α = 0

tactic: exact Nat.card_eq_zero_of_infinite
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type ?u.4320
f : α → β
hf : Function.Surjective f
h : Nat.card β = 0
h✝ : Infinite β
this : Infinite α
⊢ Nat.card α = 0
Theorem: AbstractCompletion.uniformContinuous_extension₂
File: Mathlib/Topology/UniformSpace/AbstractCompletion.lean

tactic: rw [uniformContinuous₂_def, AbstractCompletion.extend₂, uncurry_curry]
state_before: α : Type u_1
inst✝³ : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝² : UniformSpace β
pkg' : AbstractCompletion β
γ : Type u_3
inst✝¹ : UniformSpace γ
f : α → β → γ
inst✝ : CompleteSpace γ
⊢ UniformContinuous₂ (AbstractCompletion.extend₂ pkg pkg' f)

tactic: apply uniformContinuous_extend
state_before: α : Type u_1
inst✝³ : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝² : UniformSpace β
pkg' : AbstractCompletion β
γ : Type u_3
inst✝¹ : UniformSpace γ
f : α → β → γ
inst✝ : CompleteSpace γ
⊢ UniformContinuous (AbstractCompletion.extend (AbstractCompletion.prod pkg pkg') (uncurry f))
Theorem: RatFunc.algebraMap_eq_zero_iff
File: Mathlib/FieldTheory/RatFunc.lean

tactic: rw [hx, RingHom.map_zero]
state_before: K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
x : K[X]
hx : x = 0
⊢ ↑(algebraMap K[X] (RatFunc K)) x = 0
Theorem: AffineMap.map_top_of_surjective
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [← AffineSubspace.ext_iff]
state_before: k : Type u_5
V₁ : Type u_3
P₁ : Type u_1
V₂ : Type u_4
P₂ : Type u_2
V₃ : Type ?u.576335
P₃ : Type ?u.576338
inst✝⁹ : Ring k
inst✝⁸ : AddCommGroup V₁
inst✝⁷ : Module k V₁
inst✝⁶ : AffineSpace V₁ P₁
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module k V₂
inst✝³ : AffineSpace V₂ P₂
inst✝² : AddCommGroup V₃
inst✝¹ : Module k V₃
inst✝ : AffineSpace V₃ P₃
f : P₁ →ᵃ[k] P₂
hf : Function.Surjective ↑f
⊢ AffineSubspace.map f ⊤ = ⊤

tactic: exact image_univ_of_surjective hf
state_before: k : Type u_5
V₁ : Type u_3
P₁ : Type u_1
V₂ : Type u_4
P₂ : Type u_2
V₃ : Type ?u.576335
P₃ : Type ?u.576338
inst✝⁹ : Ring k
inst✝⁸ : AddCommGroup V₁
inst✝⁷ : Module k V₁
inst✝⁶ : AffineSpace V₁ P₁
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module k V₂
inst✝³ : AffineSpace V₂ P₂
inst✝² : AddCommGroup V₃
inst✝¹ : Module k V₃
inst✝ : AffineSpace V₃ P₃
f : P₁ →ᵃ[k] P₂
hf : Function.Surjective ↑f
⊢ ↑(AffineSubspace.map f ⊤) = ↑⊤
Theorem: continuous_sigma_map
File: Mathlib/Topology/Constructions.lean

tactic: simp only [Sigma.map, embedding_sigmaMk.continuous_iff, comp]
state_before: α : Type u
β : Type v
γ : Type ?u.529521
δ : Type ?u.529524
ε : Type ?u.529527
ζ : Type ?u.529530
ι : Type u_2
κ : Type u_4
σ : ι → Type u_1
τ : κ → Type u_3
inst✝² : (i : ι) → TopologicalSpace (σ i)
inst✝¹ : (k : κ) → TopologicalSpace (τ k)
inst✝ : TopologicalSpace α
f₁ : ι → κ
f₂ : (i : ι) → σ i → τ (f₁ i)
⊢ (∀ (i : ι), Continuous fun a => Sigma.map f₁ f₂ { fst := i, snd := a }) ↔ ∀ (i : ι), Continuous (f₂ i)
Theorem: List.replaceF_eq_replaceFTR
File: Std/Data/List/Basic.lean

tactic: funext α p l
state_before: ⊢ @replaceF = @replaceFTR

tactic: simp [replaceFTR]
state_before: case h.h.h
α : Type u_1
p : α → Option α
l : List α
⊢ replaceF p l = replaceFTR p l

tactic: exact (go #[] _).symm
state_before: case h.h.h
α : Type u_1
p : α → Option α
l : List α
⊢ replaceF p l = replaceFTR.go p l #[]

tactic: simp [replaceFTR.go, replaceF]
state_before: α : Type u_1
p : α → Option α
l : List α
acc : Array α
⊢ replaceFTR.go p [] acc = acc.data ++ replaceF p []

tactic: simp [replaceFTR.go, replaceF]
state_before: α : Type u_1
p : α → Option α
l : List α
acc : Array α
x : α
xs : List α
⊢ replaceFTR.go p (x :: xs) acc = acc.data ++ replaceF p (x :: xs)

tactic: cases p x <;> simp
state_before: α : Type u_1
p : α → Option α
l : List α
acc : Array α
x : α
xs : List α
⊢ (match p x with
    | none => replaceFTR.go p xs (Array.push acc x)
    | some a' => acc.data ++ a' :: xs) =
    acc.data ++
      match p x with
      | none => x :: replaceF p xs
      | some a => a :: xs

tactic: rw [go _ xs]
state_before: case none
α : Type u_1
p : α → Option α
l : List α
acc : Array α
x : α
xs : List α
⊢ replaceFTR.go p xs (Array.push acc x) = acc.data ++ x :: replaceF p xs

tactic: simp
state_before: case none
α : Type u_1
p : α → Option α
l : List α
acc : Array α
x : α
xs : List α
⊢ (Array.push acc x).data ++ replaceF p xs = acc.data ++ x :: replaceF p xs
Theorem: denselyOrdered_orderDual
File: Mathlib/Order/Basic.lean

tactic: convert @OrderDual.denselyOrdered αᵒᵈ _
state_before: ι : Type ?u.109298
α : Type u
β : Type v
γ : Type w
π : ι → Type ?u.109309
r : α → α → Prop
inst✝ : LT α
⊢ DenselyOrdered αᵒᵈ → DenselyOrdered α
Theorem: mul_one_div
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [div_eq_mul_inv, one_mul, div_eq_mul_inv]
state_before: α : Type ?u.18193
β : Type ?u.18196
G : Type u_1
inst✝ : DivInvMonoid G
a b c x y : G
⊢ x * (1 / y) = x / y
Theorem: Multiset.card_eq_countp_add_countp
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp [l.length_eq_countp_add_countp p]
state_before: α : Type u_1
β : Type ?u.302041
γ : Type ?u.302044
p : α → Prop
inst✝ : DecidablePred p
s : Multiset α
l : List α
⊢ ↑card (Quot.mk Setoid.r l) = countp p (Quot.mk Setoid.r l) + countp (fun x => ¬p x) (Quot.mk Setoid.r l)
Theorem: FiniteField.pow_card_sub_one_eq_one
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: calc
  a ^ (Fintype.card K - 1) = (Units.mk0 a ha ^ (Fintype.card K - 1) : Kˣ).1 := by
    rw [Units.val_pow_eq_pow_val, Units.val_mk0]
  _ = 1 := by
    classical
      rw [← Fintype.card_units, pow_card_eq_one]
      rfl
state_before: K : Type u_1
R : Type ?u.113435
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
ha : a ≠ 0
⊢ a ^ (q - 1) = 1

tactic: rw [Units.val_pow_eq_pow_val, Units.val_mk0]
state_before: K : Type u_1
R : Type ?u.113435
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
ha : a ≠ 0
⊢ a ^ (q - 1) = ↑(Units.mk0 a ha ^ (q - 1))

tactic: classical
  rw [← Fintype.card_units, pow_card_eq_one]
  rfl
state_before: K : Type u_1
R : Type ?u.113435
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
ha : a ≠ 0
⊢ ↑(Units.mk0 a ha ^ (q - 1)) = 1

tactic: rw [← Fintype.card_units, pow_card_eq_one]
state_before: K : Type u_1
R : Type ?u.113435
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
ha : a ≠ 0
⊢ ↑(Units.mk0 a ha ^ (q - 1)) = 1

tactic: rfl
state_before: K : Type u_1
R : Type ?u.113435
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
ha : a ≠ 0
⊢ ↑1 = 1
Theorem: Pell.isPell_mul
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: simp [mul_comm, mul_left_comm c, mul_assoc,
star_mul, isPell_norm.1 hb, isPell_norm.1 hc]
state_before: d : ℤ
b c : ℤ√d
hb : IsPell b
hc : IsPell c
⊢ b * c * star (b * c) = 1
Theorem: HahnSeries.embDomain_coeff
File: Mathlib/RingTheory/HahnSeries.lean

tactic: rw [embDomain]
state_before: Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
⊢ coeff (embDomain f x) (↑f a) = coeff x a

tactic: dsimp only
state_before: Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
⊢ coeff
      { coeff := fun b => if h : b ∈ ↑f '' support x then coeff x (Classical.choose h) else 0,
        isPwo_support' :=
          (_ :
            Set.IsPwo (Function.support fun b => if h : b ∈ ↑f '' support x then coeff x (Classical.choose h) else 0)) }
      (↑f a) =
    coeff x a

tactic: by_cases ha : a ∈ x.support
state_before: Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
⊢ (if h : ↑f a ∈ ↑f '' support x then coeff x (Classical.choose h) else 0) = coeff x a

tactic: rw [dif_pos (Set.mem_image_of_mem f ha)]
state_before: case pos
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
ha : a ∈ support x
⊢ (if h : ↑f a ∈ ↑f '' support x then coeff x (Classical.choose h) else 0) = coeff x a

tactic: exact congr rfl (f.injective (Classical.choose_spec (Set.mem_image_of_mem f ha)).2)
state_before: case pos
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
ha : a ∈ support x
⊢ coeff x (Classical.choose (_ : ↑f a ∈ ↑f '' support x)) = coeff x a

tactic: rw [dif_neg, Classical.not_not.1 fun c => ha ((mem_support _ _).2 c)]
state_before: case neg
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
ha : ¬a ∈ support x
⊢ (if h : ↑f a ∈ ↑f '' support x then coeff x (Classical.choose h) else 0) = coeff x a

tactic: contrapose! ha
state_before: case neg.hnc
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
ha : ¬a ∈ support x
⊢ ¬↑f a ∈ ↑f '' support x

tactic: obtain ⟨b, hb1, hb2⟩ := (Set.mem_image _ _ _).1 ha
state_before: case neg.hnc
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
ha : ↑f a ∈ ↑f '' support x
⊢ a ∈ support x

tactic: rwa [f.injective hb2] at hb1
state_before: case neg.hnc.intro.intro
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a✝ b✝ : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
a : Γ
ha : ↑f a ∈ ↑f '' support x
b : Γ
hb1 : b ∈ support x
hb2 : ↑f b = ↑f a
⊢ a ∈ support x
Theorem: Std.HashMap.Imp.Bucket.mk_size
File: Std/Data/HashMap/WF.lean

tactic: simp [Bucket.size_eq, Bucket.mk, mkArray]
state_before: α : Type u_1
β : Type u_2
n : Nat
h : 0 < n
⊢ size (mk n) = 0

tactic: clear h
state_before: α : Type u_1
β : Type u_2
n : Nat
h : 0 < n
⊢ Nat.sum (List.map (fun x => List.length (AssocList.toList x)) (List.replicate n AssocList.nil)) = 0

tactic: induction n <;> simp [*]
state_before: α : Type u_1
β : Type u_2
n : Nat
⊢ Nat.sum (List.map (fun x => List.length (AssocList.toList x)) (List.replicate n AssocList.nil)) = 0
Theorem: Finset.erase_union_distrib
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [erase_eq, union_sdiff_distrib]
state_before: α : Type u_1
β : Type ?u.263332
γ : Type ?u.263335
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a✝ b : α
s t : Finset α
a : α
⊢ erase (s ∪ t) a = erase s a ∪ erase t a
Theorem: Submodule.comap_op_one
File: Mathlib/Algebra/Algebra/Operations.lean

tactic: ext
state_before: ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n : A
⊢ comap (↑(opLinearEquiv R)) 1 = 1

tactic: simp
state_before: case h
ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n x✝ : A
⊢ x✝ ∈ comap (↑(opLinearEquiv R)) 1 ↔ x✝ ∈ 1
Theorem: Multiset.dedup_map_dedup_eq
File: Mathlib/Data/Multiset/Dedup.lean

tactic: simp [dedup_ext]
state_before: α : Type u_2
β : Type u_1
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
s : Multiset α
⊢ dedup (map f (dedup s)) = dedup (map f s)
Theorem: Finset.image₂_union_right
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_3
α' : Type ?u.35555
β : Type u_1
β' : Type ?u.35561
γ : Type u_2
γ' : Type ?u.35567
δ : Type ?u.35570
δ' : Type ?u.35573
ε : Type ?u.35576
ε' : Type ?u.35579
ζ : Type ?u.35582
ζ' : Type ?u.35585
ν : Type ?u.35588
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 β
⊢ ↑(image₂ f s (t ∪ t')) = ↑(image₂ f s t ∪ image₂ f s t')

tactic: exact image2_union_right
state_before: α : Type u_3
α' : Type ?u.35555
β : Type u_1
β' : Type ?u.35561
γ : Type u_2
γ' : Type ?u.35567
δ : Type ?u.35570
δ' : Type ?u.35573
ε : Type ?u.35576
ε' : Type ?u.35579
ζ : Type ?u.35582
ζ' : Type ?u.35585
ν : Type ?u.35588
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 β
⊢ image2 f (↑s) (↑t ∪ ↑t') = image2 f ↑s ↑t ∪ image2 f ↑s ↑t'
Theorem: OrderTop.ext
File: Mathlib/Order/BoundedOrder.lean

tactic: rcases A with ⟨ha⟩
state_before: α✝ : Type u
β : Type v
γ : Type ?u.18573
δ : Type ?u.18576
α : Type u_1
inst✝ : PartialOrder α
A B : OrderTop α
⊢ A = B

tactic: rcases B with ⟨hb⟩
state_before: case mk
α✝ : Type u
β : Type v
γ : Type ?u.18573
δ : Type ?u.18576
α : Type u_1
inst✝ : PartialOrder α
B : OrderTop α
toTop✝ : Top α
ha : ∀ (a : α), a ≤ ⊤
⊢ mk ha = B

tactic: congr
state_before: case mk.mk
α✝ : Type u
β : Type v
γ : Type ?u.18573
δ : Type ?u.18576
α : Type u_1
inst✝ : PartialOrder α
toTop✝¹ : Top α
ha : ∀ (a : α), a ≤ ⊤
toTop✝ : Top α
hb : ∀ (a : α), a ≤ ⊤
⊢ mk ha = mk hb

tactic: ext
state_before: case mk.mk.e_toTop
α✝ : Type u
β : Type v
γ : Type ?u.18573
δ : Type ?u.18576
α : Type u_1
inst✝ : PartialOrder α
toTop✝¹ : Top α
ha : ∀ (a : α), a ≤ ⊤
toTop✝ : Top α
hb : ∀ (a : α), a ≤ ⊤
⊢ toTop✝¹ = toTop✝

tactic: exact le_antisymm (hb _) (ha _)
state_before: case mk.mk.e_toTop.top
α✝ : Type u
β : Type v
γ : Type ?u.18573
δ : Type ?u.18576
α : Type u_1
inst✝ : PartialOrder α
toTop✝¹ : Top α
ha : ∀ (a : α), a ≤ ⊤
toTop✝ : Top α
hb : ∀ (a : α), a ≤ ⊤
⊢ ⊤ = ⊤
Theorem: Real.sin_ne_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: rw [← not_exists, not_iff_not, sin_eq_zero_iff]
state_before: x : ℝ
⊢ sin x ≠ 0 ↔ ∀ (n : ℤ), ↑n * π ≠ x
Theorem: Polynomial.count_roots
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: by_cases hp : p = 0
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
⊢ count a (roots p) = rootMultiplicity a p

tactic: rw [roots, dif_neg hp]
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp : ¬p = 0
⊢ count a (roots p) = rootMultiplicity a p

tactic: exact (Classical.choose_spec (exists_multiset_roots hp)).2 a
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp : ¬p = 0
⊢ count a (Classical.choose (_ : ∃ s, ↑(↑Multiset.card s) ≤ degree p ∧ ∀ (a : R), count a s = rootMultiplicity a p)) =
    rootMultiplicity a p

tactic: simp [hp]
state_before: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp : p = 0
⊢ count a (roots p) = rootMultiplicity a p
Theorem: Fin.prod_univ_eight
File: Mathlib/Algebra/BigOperators/Fin.lean

tactic: rw [prod_univ_castSucc, prod_univ_seven]
state_before: α : Type ?u.31962
β : Type u_1
inst✝ : CommMonoid β
f : Fin 8 → β
⊢ ∏ i : Fin 8, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7

tactic: rfl
state_before: α : Type ?u.31962
β : Type u_1
inst✝ : CommMonoid β
f : Fin 8 → β
⊢ f (↑castSucc 0) * f (↑castSucc 1) * f (↑castSucc 2) * f (↑castSucc 3) * f (↑castSucc 4) * f (↑castSucc 5) *
        f (↑castSucc 6) *
      f (last 7) =
    f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7