tasksource/leandojo huggingface dataset:
Theorem: ordConnected_iff_upperClosure_inter_lowerClosure
File: Mathlib/Order/UpperLower/Basic.lean

tactic: refine' ⟨Set.OrdConnected.upperClosure_inter_lowerClosure, fun h => _⟩
state_before: α : Type u_1
β : Type ?u.164586
γ : Type ?u.164589
ι : Sort ?u.164592
κ : ι → Sort ?u.164597
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
x : α
⊢ OrdConnected s ↔ ↑(upperClosure s) ∩ ↑(lowerClosure s) = s

tactic: rw [← h]
state_before: α : Type u_1
β : Type ?u.164586
γ : Type ?u.164589
ι : Sort ?u.164592
κ : ι → Sort ?u.164597
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
x : α
h : ↑(upperClosure s) ∩ ↑(lowerClosure s) = s
⊢ OrdConnected s

tactic: exact (UpperSet.upper _).ordConnected.inter (LowerSet.lower _).ordConnected
state_before: α : Type u_1
β : Type ?u.164586
γ : Type ?u.164589
ι : Sort ?u.164592
κ : ι → Sort ?u.164597
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
x : α
h : ↑(upperClosure s) ∩ ↑(lowerClosure s) = s
⊢ OrdConnected (↑(upperClosure s) ∩ ↑(lowerClosure s))
Theorem: Ordinal.add_left_cancel
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp only [le_antisymm_iff, add_le_add_iff_left]
state_before: α : Type ?u.54905
β : Type ?u.54908
γ : Type ?u.54911
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal
⊢ a + b = a + c ↔ b = c
Theorem: inv_sub_inv'
File: Mathlib/Algebra/Field/Basic.lean

tactic: rw [mul_sub, sub_mul, mul_inv_cancel_right₀ hb, inv_mul_cancel ha, one_mul]
state_before: α : Type ?u.42064
β : Type ?u.42067
K : Type u_1
inst✝ : DivisionRing K
a✝ b✝ c d a b : K
ha : a ≠ 0
hb : b ≠ 0
⊢ a⁻¹ - b⁻¹ = a⁻¹ * (b - a) * b⁻¹
Theorem: CategoryTheory.GlueData.t'_jii
File: Mathlib/CategoryTheory/GlueData.lean

tactic: rw [← Category.assoc, ← D.t_fac]
state_before: C : Type u₁
inst✝¹ : Category C
C' : Type u₂
inst✝ : Category C'
D : GlueData C
i j : D.J
⊢ t' D j i i = pullback.fst ≫ t D j i ≫ inv pullback.snd

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
C' : Type u₂
inst✝ : Category C'
D : GlueData C
i j : D.J
⊢ t' D j i i = (t' D j i i ≫ pullback.snd) ≫ inv pullback.snd
Theorem: Nat.Partrec.Code.eval_part
File: Mathlib/Computability/PartrecCode.lean

tactic: simp [eval_eq_rfindOpt]
state_before: a : Code × ℕ
⊢ (rfindOpt fun b =>
      evaln (((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).fst.fst
        (((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).fst.snd (((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).snd) =
    eval a.fst a.snd
Theorem: Rat.divInt_self
File: Std/Data/Rat/Lemmas.lean

tactic: rw [divInt_ofNat, mkRat_self]
state_before: a : Rat
⊢ a.num /. ↑a.den = a
Theorem: ConvexOn.comp_affineMap
File: Mathlib/Analysis/Convex/Function.lean

tactic: rw [Convex.combo_affine_apply hab]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
α : Type ?u.743875
β : Type u_4
ι : Type ?u.743881
inst✝⁶ : LinearOrderedField 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : AddCommGroup F
inst✝³ : OrderedAddCommMonoid β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 F
inst✝ : SMul 𝕜 β
f : F → β
g : E →ᵃ[𝕜] F
s : Set F
hf : ConvexOn 𝕜 s f
x : E
hx : x ∈ ↑g ⁻¹' s
y : E
hy : y ∈ ↑g ⁻¹' s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ f (↑g (a • x + b • y)) = f (a • ↑g x + b • ↑g y)
Theorem: Polynomial.C_half_mul_two_eq_one
File: Mathlib/RingTheory/Polynomial/Dickson.lean

tactic: rw [mul_comm, two_mul_C_half_eq_one]
state_before: R : Type u_1
S : Type ?u.151322
inst✝² : CommRing R
inst✝¹ : CommRing S
k : ℕ
a : R
inst✝ : Invertible 2
⊢ ↑C ⅟2 * 2 = 1
Theorem: Set.univ_pi_update
File: Mathlib/Data/Set/Prod.lean

tactic: rw [compl_eq_univ_diff, ← pi_update_of_mem (mem_univ _)]
state_before: ι : Type u_1
α : ι → Type u_3
β✝ : ι → Type ?u.152906
s s₁ s₂ : Set ι
t✝ t₁ t₂ : (i : ι) → Set (α i)
i✝ : ι
inst✝ : DecidableEq ι
β : ι → Type u_2
i : ι
f : (j : ι) → α j
a : α i
t : (j : ι) → α j → Set (β j)
⊢ (pi univ fun j => t j (update f i a j)) = {x | x i ∈ t i a} ∩ pi ({i}ᶜ) fun j => t j (f j)
Theorem: CategoryTheory.Limits.coprod.pentagon
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: simp
state_before: C : Type u
inst✝² : Category C
X✝ Y✝ : C
inst✝¹ : Category C
inst✝ : HasBinaryCoproducts C
W X Y Z : C
⊢ map (associator W X Y).hom (𝟙 Z) ≫ (associator W (X ⨿ Y) Z).hom ≫ map (𝟙 W) (associator X Y Z).hom =
    (associator (W ⨿ X) Y Z).hom ≫ (associator W X (Y ⨿ Z)).hom
Theorem: List.permutations'Aux_nthLe_zero
File: Mathlib/Data/List/Perm.lean

tactic: simp
state_before: α : Type uu
β : Type vv
l₁ l₂ s : List α
x : α
⊢ 0 < length (permutations'Aux x s)
Theorem: Int.land_bit
File: Mathlib/Data/Int/Bitwise.lean

tactic: rw [← bitwise_and, bitwise_bit]
state_before: a : Bool
m : ℤ
b : Bool
n : ℤ
⊢ land (bit a m) (bit b n) = bit (a && b) (land m n)
Theorem: singleton_mul_mem_nhds
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: have := smul_mem_nhds a h
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace α
inst✝¹ : Group α
inst✝ : ContinuousConstSMul α α
s t : Set α
a b : α
h : s ∈ 𝓝 b
⊢ {a} * s ∈ 𝓝 (a * b)

tactic: rwa [← singleton_smul] at this
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace α
inst✝¹ : Group α
inst✝ : ContinuousConstSMul α α
s t : Set α
a b : α
h : s ∈ 𝓝 b
this : a • s ∈ 𝓝 (a • b)
⊢ {a} * s ∈ 𝓝 (a * b)
Theorem: Ordinal.log_pos
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: rwa [← succ_le_iff, succ_zero, ← opow_le_iff_le_log hb ho, opow_one]
state_before: b o : Ordinal
hb : 1 < b
ho : o ≠ 0
hbo : b ≤ o
⊢ 0 < log b o
Theorem: LucasLehmer.sMod_nonneg
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: cases i <;> dsimp [sMod]
state_before: p : ℕ
w : 0 < p
i : ℕ
⊢ 0 ≤ sMod p i

tactic: exact sup_eq_right.mp rfl
state_before: case zero
p : ℕ
w : 0 < p
⊢ 0 ≤ 4 % (2 ^ p - 1)

tactic: apply Int.emod_nonneg
state_before: case succ
p : ℕ
w : 0 < p
n✝ : ℕ
⊢ 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)

tactic: exact mersenne_int_ne_zero p w
state_before: case succ.a
p : ℕ
w : 0 < p
n✝ : ℕ
⊢ 2 ^ p - 1 ≠ 0
Theorem: MvPolynomial.map_surjective
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: induction' p using MvPolynomial.induction_on' with i fr a b ha hb
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
hf : Surjective ↑f
p : MvPolynomial σ S₁
⊢ ∃ a, ↑(map f) a = p

tactic: obtain ⟨r, rfl⟩ := hf fr
state_before: case h1
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
hf : Surjective ↑f
i : σ →₀ ℕ
fr : S₁
⊢ ∃ a, ↑(map f) a = ↑(monomial i) fr

tactic: exact ⟨monomial i r, map_monomial _ _ _⟩
state_before: case h1.intro
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
hf : Surjective ↑f
i : σ →₀ ℕ
r : R
⊢ ∃ a, ↑(map f) a = ↑(monomial i) (↑f r)

tactic: obtain ⟨a, rfl⟩ := ha
state_before: case h2
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
hf : Surjective ↑f
a b : MvPolynomial σ S₁
ha : ∃ a_1, ↑(map f) a_1 = a
hb : ∃ a, ↑(map f) a = b
⊢ ∃ a_1, ↑(map f) a_1 = a + b

tactic: obtain ⟨b, rfl⟩ := hb
state_before: case h2.intro
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
hf : Surjective ↑f
b : MvPolynomial σ S₁
hb : ∃ a, ↑(map f) a = b
a : MvPolynomial σ R
⊢ ∃ a_1, ↑(map f) a_1 = ↑(map f) a + b

tactic: exact ⟨a + b, RingHom.map_add _ _ _⟩
state_before: case h2.intro.intro
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
hf : Surjective ↑f
a b : MvPolynomial σ R
⊢ ∃ a_1, ↑(map f) a_1 = ↑(map f) a + ↑(map f) b
Theorem: Trivialization.comp_continuousLinearEquivAt_eq_coord_change
File: Mathlib/Topology/VectorBundle/Basic.lean

tactic: ext v
state_before: R : Type u_4
B : Type u_1
F : Type u_2
E : B → Type u_3
inst✝¹⁰ : NontriviallyNormedField R
inst✝⁹ : (x : B) → AddCommMonoid (E x)
inst✝⁸ : (x : B) → Module R (E x)
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace R F
inst✝⁵ : TopologicalSpace B
inst✝⁴ : TopologicalSpace (TotalSpace E)
inst✝³ : (x : B) → TopologicalSpace (E x)
inst✝² : FiberBundle F E
e e' : Trivialization F TotalSpace.proj
inst✝¹ : Trivialization.IsLinear R e
inst✝ : Trivialization.IsLinear R e'
b : B
hb : b ∈ e.baseSet ∩ e'.baseSet
⊢ ContinuousLinearEquiv.trans (ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b (_ : b ∈ e.baseSet)))
      (continuousLinearEquivAt R e' b (_ : b ∈ e'.baseSet)) =
    coordChangeL R e e' b

tactic: rw [coordChangeL_apply e e' hb]
state_before: case h.h
R : Type u_4
B : Type u_1
F : Type u_2
E : B → Type u_3
inst✝¹⁰ : NontriviallyNormedField R
inst✝⁹ : (x : B) → AddCommMonoid (E x)
inst✝⁸ : (x : B) → Module R (E x)
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace R F
inst✝⁵ : TopologicalSpace B
inst✝⁴ : TopologicalSpace (TotalSpace E)
inst✝³ : (x : B) → TopologicalSpace (E x)
inst✝² : FiberBundle F E
e e' : Trivialization F TotalSpace.proj
inst✝¹ : Trivialization.IsLinear R e
inst✝ : Trivialization.IsLinear R e'
b : B
hb : b ∈ e.baseSet ∩ e'.baseSet
v : F
⊢ ↑(ContinuousLinearEquiv.trans (ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b (_ : b ∈ e.baseSet)))
          (continuousLinearEquivAt R e' b (_ : b ∈ e'.baseSet)))
      v =
    ↑(coordChangeL R e e' b) v

tactic: rfl
state_before: case h.h
R : Type u_4
B : Type u_1
F : Type u_2
E : B → Type u_3
inst✝¹⁰ : NontriviallyNormedField R
inst✝⁹ : (x : B) → AddCommMonoid (E x)
inst✝⁸ : (x : B) → Module R (E x)
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace R F
inst✝⁵ : TopologicalSpace B
inst✝⁴ : TopologicalSpace (TotalSpace E)
inst✝³ : (x : B) → TopologicalSpace (E x)
inst✝² : FiberBundle F E
e e' : Trivialization F TotalSpace.proj
inst✝¹ : Trivialization.IsLinear R e
inst✝ : Trivialization.IsLinear R e'
b : B
hb : b ∈ e.baseSet ∩ e'.baseSet
v : F
⊢ ↑(ContinuousLinearEquiv.trans (ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b (_ : b ∈ e.baseSet)))
          (continuousLinearEquivAt R e' b (_ : b ∈ e'.baseSet)))
      v =
    (↑e' (totalSpaceMk b (Trivialization.symm e b v))).snd
Theorem: RelEmbedding.not_wellFounded_of_decreasing_seq
File: Mathlib/Order/OrderIsoNat.lean

tactic: rw [wellFounded_iff_no_descending_seq, not_isEmpty_iff]
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsStrictOrder α r
f : (fun x x_1 => x > x_1) ↪r r
⊢ ¬WellFounded r

tactic: exact ⟨f⟩
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsStrictOrder α r
f : (fun x x_1 => x > x_1) ↪r r
⊢ Nonempty ((fun x x_1 => x > x_1) ↪r r)
Theorem: Complex.sin_mul_I
File: Mathlib/Data/Complex/Exponential.lean

tactic: have h : I * sin (x * I) = -sinh x := by
  rw [mul_comm, ← sinh_mul_I]
  ring_nf
  simp
state_before: x y : ℂ
⊢ sin (x * I) = sinh x * I

tactic: rw [← neg_neg (sinh x), ← h]
state_before: x y : ℂ
h : I * sin (x * I) = -sinh x
⊢ sin (x * I) = sinh x * I

tactic: ext <;> simp
state_before: x y : ℂ
h : I * sin (x * I) = -sinh x
⊢ sin (x * I) = -(I * sin (x * I)) * I

tactic: rw [mul_comm, ← sinh_mul_I]
state_before: x y : ℂ
⊢ I * sin (x * I) = -sinh x

tactic: ring_nf
state_before: x y : ℂ
⊢ sinh (x * I * I) = -sinh x

tactic: simp
state_before: x y : ℂ
⊢ sinh (x * I ^ 2) = -sinh x
Theorem: PNat.Coprime.gcd_mul_right_cancel
File: Mathlib/Data/PNat/Prime.lean

tactic: rw [mul_comm]
state_before: m n k : ℕ+
⊢ Coprime k n → gcd (m * k) n = gcd m n

tactic: apply Coprime.gcd_mul_left_cancel
state_before: m n k : ℕ+
⊢ Coprime k n → gcd (k * m) n = gcd m n
Theorem: List.prev_cons_cons_eq'
File: Mathlib/Data/List/Cycle.lean

tactic: rw [prev, dif_pos hx]
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x y z : α
h : x ∈ y :: z :: l
hx : x = y
⊢ prev (y :: z :: l) x h = getLast (z :: l) (_ : z :: l ≠ [])
Theorem: compl_singleton_mem_nhdsSet_iff
File: Mathlib/Topology/Separation.lean

tactic: rw [isOpen_compl_singleton.mem_nhdsSet, subset_compl_singleton_iff]
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : T1Space α
x : α
s : Set α
⊢ {x}ᶜ ∈ 𝓝ˢ s ↔ ¬x ∈ s
Theorem: Set.ncard_le_one_iff_eq
File: Mathlib/Data/Set/Ncard.lean

tactic: obtain rfl | ⟨x, hx⟩ := s.eq_empty_or_nonempty
state_before: α : Type u_1
β : Type ?u.153618
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
⊢ ncard s ≤ 1 ↔ s = ∅ ∨ ∃ a, s = {a}

tactic: rw [ncard_le_one_iff hs]
state_before: case inr.intro
α : Type u_1
β : Type ?u.153618
s t : Set α
a b x✝ y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
x : α
hx : x ∈ s
⊢ ncard s ≤ 1 ↔ s = ∅ ∨ ∃ a, s = {a}

tactic: refine' ⟨fun h ↦ Or.inr ⟨x, (singleton_subset_iff.mpr hx).antisymm' fun y hy ↦ h hy hx⟩, _⟩
state_before: case inr.intro
α : Type u_1
β : Type ?u.153618
s t : Set α
a b x✝ y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
x : α
hx : x ∈ s
⊢ (∀ {a b : α}, a ∈ s → b ∈ s → a = b) ↔ s = ∅ ∨ ∃ a, s = {a}

tactic: rintro (rfl | ⟨a, rfl⟩)
state_before: case inr.intro
α : Type u_1
β : Type ?u.153618
s t : Set α
a b x✝ y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
x : α
hx : x ∈ s
⊢ (s = ∅ ∨ ∃ a, s = {a}) → ∀ {a b : α}, a ∈ s → b ∈ s → a = b

tactic: simp_rw [mem_singleton_iff] at hx⊢
state_before: case inr.intro.inr.intro
α : Type u_1
β : Type ?u.153618
t : Set α
a✝ b x✝ y : α
f : α → β
x a : α
hs : autoParam (Set.Finite {a}) _auto✝
hx : x ∈ {a}
⊢ ∀ {a_1 b : α}, a_1 ∈ {a} → b ∈ {a} → a_1 = b

tactic: subst hx
state_before: case inr.intro.inr.intro
α : Type u_1
β : Type ?u.153618
t : Set α
a✝ b x✝ y : α
f : α → β
x a : α
hs : autoParam (Set.Finite {a}) _auto✝
hx : x = a
⊢ ∀ {a_1 b : α}, a_1 = a → b = a → a_1 = b

tactic: simp only [forall_eq_apply_imp_iff', imp_self, implies_true]
state_before: case inr.intro.inr.intro
α : Type u_1
β : Type ?u.153618
t : Set α
a b x✝ y : α
f : α → β
x : α
hs : autoParam (Set.Finite {x}) _auto✝
⊢ ∀ {a b : α}, a = x → b = x → a = b

tactic: exact iff_of_true (by simp) (Or.inl rfl)
state_before: case inl
α : Type u_1
β : Type ?u.153618
t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite ∅) _auto✝
⊢ ncard ∅ ≤ 1 ↔ ∅ = ∅ ∨ ∃ a, ∅ = {a}

tactic: simp
state_before: α : Type u_1
β : Type ?u.153618
t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite ∅) _auto✝
⊢ ncard ∅ ≤ 1

tactic: exact (not_mem_empty _ hx).elim
state_before: case inr.intro.inl
α : Type u_1
β : Type ?u.153618
t : Set α
a b x✝ y : α
f : α → β
x : α
hs : autoParam (Set.Finite ∅) _auto✝
hx : x ∈ ∅
⊢ ∀ {a b : α}, a ∈ ∅ → b ∈ ∅ → a = b
Theorem: Associates.count_ne_zero_iff_dvd
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: nontriviality α
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0 ↔ p ∣ a

tactic: rw [← Associates.mk_le_mk_iff_dvd_iff]
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝¹ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : α
ha0 : a ≠ 0
hp : Irreducible p
inst✝ : Nontrivial α
⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0 ↔ p ∣ a

tactic: refine'
  ⟨fun h =>
    Associates.le_of_count_ne_zero (Associates.mk_ne_zero.mpr ha0)
      ((Associates.irreducible_mk p).mpr hp) h,
    fun h => _⟩
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝¹ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : α
ha0 : a ≠ 0
hp : Irreducible p
inst✝ : Nontrivial α
⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0 ↔ Associates.mk p ≤ Associates.mk a

tactic: rw [← pow_one (Associates.mk p),
  Associates.prime_pow_dvd_iff_le (Associates.mk_ne_zero.mpr ha0)
    ((Associates.irreducible_mk p).mpr hp)] at h
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝¹ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : α
ha0 : a ≠ 0
hp : Irreducible p
inst✝ : Nontrivial α
h : Associates.mk p ≤ Associates.mk a
⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0

tactic: exact (zero_lt_one.trans_le h).ne'
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝¹ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : α
ha0 : a ≠ 0
hp : Irreducible p
inst✝ : Nontrivial α
h : 1 ≤ count (Associates.mk p) (factors (Associates.mk a))
⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0
Theorem: Finset.noncommProd_mul_distrib_aux
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: intro x hx y hy h
state_before: F : Type ?u.217198
ι : Type ?u.217201
α : Type u_1
β : Type u_2
γ : Type ?u.217210
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f g : α → β
comm_ff : Set.Pairwise ↑s fun x y => Commute (f x) (f y)
comm_gg : Set.Pairwise ↑s fun x y => Commute (g x) (g y)
comm_gf : Set.Pairwise ↑s fun x y => Commute (g x) (f y)
⊢ Set.Pairwise ↑s fun x y => Commute ((f * g) x) ((f * g) y)

tactic: apply Commute.mul_left <;> apply Commute.mul_right
state_before: F : Type ?u.217198
ι : Type ?u.217201
α : Type u_1
β : Type u_2
γ : Type ?u.217210
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f g : α → β
comm_ff : Set.Pairwise ↑s fun x y => Commute (f x) (f y)
comm_gg : Set.Pairwise ↑s fun x y => Commute (g x) (g y)
comm_gf : Set.Pairwise ↑s fun x y => Commute (g x) (f y)
x : α
hx : x ∈ ↑s
y : α
hy : y ∈ ↑s
h : x ≠ y
⊢ Commute ((f * g) x) ((f * g) y)

tactic: exact comm_ff.of_refl hx hy
state_before: case hac.hab
F : Type ?u.217198
ι : Type ?u.217201
α : Type u_1
β : Type u_2
γ : Type ?u.217210
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f g : α → β
comm_ff : Set.Pairwise ↑s fun x y => Commute (f x) (f y)
comm_gg : Set.Pairwise ↑s fun x y => Commute (g x) (g y)
comm_gf : Set.Pairwise ↑s fun x y => Commute (g x) (f y)
x : α
hx : x ∈ ↑s
y : α
hy : y ∈ ↑s
h : x ≠ y
⊢ Commute (f x) (f y)

tactic: exact (comm_gf hy hx h.symm).symm
state_before: case hac.hac
F : Type ?u.217198
ι : Type ?u.217201
α : Type u_1
β : Type u_2
γ : Type ?u.217210
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f g : α → β
comm_ff : Set.Pairwise ↑s fun x y => Commute (f x) (f y)
comm_gg : Set.Pairwise ↑s fun x y => Commute (g x) (g y)
comm_gf : Set.Pairwise ↑s fun x y => Commute (g x) (f y)
x : α
hx : x ∈ ↑s
y : α
hy : y ∈ ↑s
h : x ≠ y
⊢ Commute (f x) (g y)

tactic: exact comm_gf hx hy h
state_before: case hbc.hab
F : Type ?u.217198
ι : Type ?u.217201
α : Type u_1
β : Type u_2
γ : Type ?u.217210
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f g : α → β
comm_ff : Set.Pairwise ↑s fun x y => Commute (f x) (f y)
comm_gg : Set.Pairwise ↑s fun x y => Commute (g x) (g y)
comm_gf : Set.Pairwise ↑s fun x y => Commute (g x) (f y)
x : α
hx : x ∈ ↑s
y : α
hy : y ∈ ↑s
h : x ≠ y
⊢ Commute (g x) (f y)

tactic: exact comm_gg.of_refl hx hy
state_before: case hbc.hac
F : Type ?u.217198
ι : Type ?u.217201
α : Type u_1
β : Type u_2
γ : Type ?u.217210
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f g : α → β
comm_ff : Set.Pairwise ↑s fun x y => Commute (f x) (f y)
comm_gg : Set.Pairwise ↑s fun x y => Commute (g x) (g y)
comm_gf : Set.Pairwise ↑s fun x y => Commute (g x) (f y)
x : α
hx : x ∈ ↑s
y : α
hy : y ∈ ↑s
h : x ≠ y
⊢ Commute (g x) (g y)
Theorem: MvPolynomial.eval₂Hom_congr
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: rintro rfl rfl rfl
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
f₁ f₂ : R →+* S₁
g₁ g₂ : σ → S₁
p₁ p₂ : MvPolynomial σ R
⊢ f₁ = f₂ → g₁ = g₂ → p₁ = p₂ → ↑(eval₂Hom f₁ g₁) p₁ = ↑(eval₂Hom f₂ g₂) p₂

tactic: rfl
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
f₁ : R →+* S₁
g₁ : σ → S₁
p₁ : MvPolynomial σ R
⊢ ↑(eval₂Hom f₁ g₁) p₁ = ↑(eval₂Hom f₁ g₁) p₁
Theorem: Int.div_eq_of_eq_mul_right
File: Std/Data/Int/DivMod.lean

tactic: rw [H2, Int.mul_div_cancel_left _ H1]
state_before: a b c : Int
H1 : b ≠ 0
H2 : a = b * c
⊢ div a b = c
Theorem: lt_one_div_of_neg
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simpa using lt_inv_of_neg ha hb
state_before: ι : Type ?u.159623
α : Type u_1
β : Type ?u.159629
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
ha : a < 0
hb : b < 0
⊢ a < 1 / b ↔ b < 1 / a
Theorem: Bitraversable.comp_tsnd
File: Mathlib/Control/Bitraversable/Lemmas.lean

tactic: rw [← comp_bitraverse]
state_before: t : Type u → Type u → Type u
inst✝⁵ : Bitraversable t
β : Type u
F G : Type u → Type u
inst✝⁴ : Applicative F
inst✝³ : Applicative G
inst✝² : IsLawfulBitraversable t
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α β₀ β₁ β₂ : Type u
g : β₀ → F β₁
g' : β₁ → G β₂
x : t α β₀
⊢ Comp.mk (tsnd g' <$> tsnd g x) = tsnd (Comp.mk ∘ map g' ∘ g) x

tactic: simp only [Function.comp, map_pure]
state_before: t : Type u → Type u → Type u
inst✝⁵ : Bitraversable t
β : Type u
F G : Type u → Type u
inst✝⁴ : Applicative F
inst✝³ : Applicative G
inst✝² : IsLawfulBitraversable t
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α β₀ β₁ β₂ : Type u
g : β₀ → F β₁
g' : β₁ → G β₂
x : t α β₀
⊢ bitraverse (Comp.mk ∘ map pure ∘ pure) (Comp.mk ∘ map g' ∘ g) x = tsnd (Comp.mk ∘ map g' ∘ g) x

tactic: rfl
state_before: t : Type u → Type u → Type u
inst✝⁵ : Bitraversable t
β : Type u
F G : Type u → Type u
inst✝⁴ : Applicative F
inst✝³ : Applicative G
inst✝² : IsLawfulBitraversable t
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α β₀ β₁ β₂ : Type u
g : β₀ → F β₁
g' : β₁ → G β₂
x : t α β₀
⊢ bitraverse (fun x => Comp.mk (pure (pure x))) (fun x => Comp.mk (g' <$> g x)) x =
    tsnd (fun x => Comp.mk (g' <$> g x)) x
Theorem: Set.ncard_union_eq
File: Mathlib/Data/Set/Ncard.lean

tactic: classical
rw [ncard_eq_toFinset_card _ hs, ncard_eq_toFinset_card _ ht,
  ncard_eq_toFinset_card _ (hs.union ht), Finite.toFinset_union]
refine' Finset.card_union_eq _
rwa [Finite.disjoint_toFinset]
state_before: α : Type u_1
β : Type ?u.122422
s t : Set α
a b x y : α
f : α → β
h : Disjoint s t
hs : autoParam (Set.Finite s) _auto✝
ht : autoParam (Set.Finite t) _auto✝
⊢ ncard (s ∪ t) = ncard s + ncard t

tactic: rw [ncard_eq_toFinset_card _ hs, ncard_eq_toFinset_card _ ht,
  ncard_eq_toFinset_card _ (hs.union ht), Finite.toFinset_union]
state_before: α : Type u_1
β : Type ?u.122422
s t : Set α
a b x y : α
f : α → β
h : Disjoint s t
hs : autoParam (Set.Finite s) _auto✝
ht : autoParam (Set.Finite t) _auto✝
⊢ ncard (s ∪ t) = ncard s + ncard t

tactic: refine' Finset.card_union_eq _
state_before: α : Type u_1
β : Type ?u.122422
s t : Set α
a b x y : α
f : α → β
h : Disjoint s t
hs : autoParam (Set.Finite s) _auto✝
ht : autoParam (Set.Finite t) _auto✝
⊢ Finset.card (Finite.toFinset ?hs ∪ Finite.toFinset ?ht) =
    Finset.card (Finite.toFinset hs) + Finset.card (Finite.toFinset ht)

case hs
α : Type u_1
β : Type ?u.122422
s t : Set α
a b x y : α
f : α → β
h : Disjoint s t
hs : autoParam (Set.Finite s) _auto✝
ht : autoParam (Set.Finite t) _auto✝
⊢ Set.Finite s

case ht
α : Type u_1
β : Type ?u.122422
s t : Set α
a b x y : α
f : α → β
h : Disjoint s t
hs : autoParam (Set.Finite s) _auto✝
ht : autoParam (Set.Finite t) _auto✝
⊢ Set.Finite t

tactic: rwa [Finite.disjoint_toFinset]
state_before: α : Type u_1
β : Type ?u.122422
s t : Set α
a b x y : α
f : α → β
h : Disjoint s t
hs : autoParam (Set.Finite s) _auto✝
ht : autoParam (Set.Finite t) _auto✝
⊢ Disjoint (Finite.toFinset hs) (Finite.toFinset ht)