tasksource/leandojo huggingface dataset:
Theorem: PadicInt.pow_dvd_nthHom_sub
File: Mathlib/NumberTheory/Padics/RingHoms.lean

tactic: specialize f_compat i j h
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), RingHom.comp (ZMod.castHom (_ : p ^ k1 ∣ p ^ k2) (ZMod (p ^ k1))) (f k2) = f k1
r : R
i j : ℕ
h : i ≤ j
⊢ ↑p ^ i ∣ nthHom f r j - nthHom f r i

tactic: rw [← Int.coe_nat_pow, ← ZMod.int_cast_zmod_eq_zero_iff_dvd, Int.cast_sub]
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
r : R
i j : ℕ
h : i ≤ j
f_compat : RingHom.comp (ZMod.castHom (_ : p ^ i ∣ p ^ j) (ZMod (p ^ i))) (f j) = f i
⊢ ↑p ^ i ∣ nthHom f r j - nthHom f r i

tactic: dsimp [nthHom]
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
r : R
i j : ℕ
h : i ≤ j
f_compat : RingHom.comp (ZMod.castHom (_ : p ^ i ∣ p ^ j) (ZMod (p ^ i))) (f j) = f i
⊢ ↑(nthHom f r j) - ↑(nthHom f r i) = 0

tactic: rw [← f_compat, RingHom.comp_apply]
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
r : R
i j : ℕ
h : i ≤ j
f_compat : RingHom.comp (ZMod.castHom (_ : p ^ i ∣ p ^ j) (ZMod (p ^ i))) (f j) = f i
⊢ ↑↑(ZMod.val (↑(f j) r)) - ↑↑(ZMod.val (↑(f i) r)) = 0

tactic: simp only [ZMod.cast_id, ZMod.castHom_apply, sub_self, ZMod.nat_cast_val, ZMod.int_cast_cast]
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
r : R
i j : ℕ
h : i ≤ j
f_compat : RingHom.comp (ZMod.castHom (_ : p ^ i ∣ p ^ j) (ZMod (p ^ i))) (f j) = f i
⊢ ↑↑(ZMod.val (↑(f j) r)) - ↑↑(ZMod.val (↑(ZMod.castHom (_ : p ^ i ∣ p ^ j) (ZMod (p ^ i))) (↑(f j) r))) = 0
Theorem: Turing.PartrecToTM2.K'.elim_update_stack
File: Mathlib/Computability/TMToPartrec.lean

tactic: funext x
state_before: a b c d d' : List Γ'
⊢ update (elim a b c d) stack d' = elim a b c d'

tactic: cases x <;> rfl
state_before: case h
a b c d d' : List Γ'
x : K'
⊢ update (elim a b c d) stack d' x = elim a b c d' x
Theorem: Fin.map_valEmbedding_Icc
File: Mathlib/Data/Fin/Interval.lean

tactic: simp [Icc_eq_finset_subtype, Finset.fin, Finset.map_map, Icc_filter_lt_of_lt_right]
state_before: n : ℕ
a b : Fin n
⊢ map valEmbedding (Icc a b) = Icc ↑a ↑b
Theorem: Fin.cons_injective2
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: simpa using congr_fun h (Fin.succ i)
state_before: m n : ℕ
α : Fin (n + 1) → Type u
x✝ : α 0
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (succ i)
i✝ : Fin n
y✝ : α (succ i✝)
z x₀ y₀ : α 0
x y : (i : Fin n) → α (succ i)
h : cons x₀ x = cons y₀ y
i : Fin n
⊢ x i = y i
Theorem: Ordering.swap_eq_iff_eq_swap
File: Mathlib/Order/Compare.lean

tactic: rw [← swap_inj, swap_swap]
state_before: α : Type ?u.6377
β : Type ?u.6380
o o' : Ordering
⊢ swap o = o' ↔ o = swap o'
Theorem: AddCommGroup.ModEq.zsmul
File: Mathlib/Algebra/ModEq.lean

tactic: rw [← smul_sub, hm, smul_comm]
state_before: α : Type u_1
inst✝ : AddCommGroup α
p a a₁ a₂ b b₁ b₂ c : α
n : ℕ
z m : ℤ
hm : b - a = m • p
⊢ z • b - z • a = m • z • p
Theorem: Qpf.liftpPreservation_iff_uniform
File: Mathlib/Data/QPF/Univariate/Basic.lean

tactic: rw [← suppPreservation_iff_liftpPreservation, suppPreservation_iff_uniform]
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ LiftpPreservation ↔ IsUniform
Theorem: Complex.continuous_circleTransform
File: Mathlib/MeasureTheory/Integral/CircleTransform.lean

tactic: apply_rules [Continuous.smul, continuous_const]
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous (circleTransform R z w f)

tactic: simp_rw [deriv_circleMap]
state_before: case hg.hf
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous fun x => deriv (circleMap z R) x

case hg.hg.hf
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous fun x => (circleMap z R x - w)⁻¹

case hg.hg.hg
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous fun x => f (circleMap z R x)

tactic: apply_rules [Continuous.mul, continuous_circleMap 0 R, continuous_const]
state_before: case hg.hf
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous fun x => circleMap 0 R x * I

case hg.hg.hf
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous fun x => (circleMap z R x - w)⁻¹

case hg.hg.hg
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous fun x => f (circleMap z R x)

tactic: apply continuous_circleMap_inv hw
state_before: case hg.hg.hf
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous fun x => (circleMap z R x - w)⁻¹

tactic: apply ContinuousOn.comp_continuous hf (continuous_circleMap z R)
state_before: case hg.hg.hg
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ Continuous fun x => f (circleMap z R x)

tactic: exact fun _ => (circleMap_mem_sphere _ hR.le) _
state_before: case hg.hg.hg
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R✝ : ℝ
z✝ w✝ : ℂ
R : ℝ
hR : 0 < R
f : ℂ → E
z w : ℂ
hf : ContinuousOn f (sphere z R)
hw : w ∈ ball z R
⊢ ∀ (x : ℝ), circleMap z R x ∈ sphere z R
Theorem: Ideal.toIdeal_homogeneousHull_eq_iSup
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean

tactic: rw [← Ideal.span_iUnion]
state_before: ι : Type u_2
σ : Type u_3
R : Type ?u.216424
A : Type u_1
inst✝⁵ : Semiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I : Ideal A
⊢ toIdeal (homogeneousHull 𝒜 I) = ⨆ (i : ι), span (↑(GradedRing.proj 𝒜 i) '' ↑I)

tactic: apply congr_arg Ideal.span _
state_before: ι : Type u_2
σ : Type u_3
R : Type ?u.216424
A : Type u_1
inst✝⁵ : Semiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I : Ideal A
⊢ toIdeal (homogeneousHull 𝒜 I) = span (⋃ (i : ι), ↑(GradedRing.proj 𝒜 i) '' ↑I)

tactic: ext1
state_before: ι : Type u_2
σ : Type u_3
R : Type ?u.216424
A : Type u_1
inst✝⁵ : Semiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I : Ideal A
⊢ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r} = ⋃ (i : ι), ↑(GradedRing.proj 𝒜 i) '' ↑I

tactic: simp only [Set.mem_iUnion, Set.mem_image, mem_setOf_eq, GradedRing.proj_apply, SetLike.exists,
  exists_prop, Subtype.coe_mk, SetLike.mem_coe]
state_before: case h
ι : Type u_2
σ : Type u_3
R : Type ?u.216424
A : Type u_1
inst✝⁵ : Semiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I : Ideal A
x✝ : A
⊢ x✝ ∈ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r} ↔ x✝ ∈ ⋃ (i : ι), ↑(GradedRing.proj 𝒜 i) '' ↑I
Theorem: Cardinal.mk_eq_nat_iff_fintype
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [mk_eq_nat_iff_finset]
state_before: α β : Type u
n : ℕ
⊢ (#α) = ↑n ↔ ∃ h, Fintype.card α = n

tactic: constructor
state_before: α β : Type u
n : ℕ
⊢ (∃ t, ↑t = univ ∧ Finset.card t = n) ↔ ∃ h, Fintype.card α = n

tactic: rintro ⟨t, ht, hn⟩
state_before: case mp
α β : Type u
n : ℕ
⊢ (∃ t, ↑t = univ ∧ Finset.card t = n) → ∃ h, Fintype.card α = n

tactic: exact ⟨⟨t, eq_univ_iff_forall.1 ht⟩, hn⟩
state_before: case mp.intro.intro
α β : Type u
n : ℕ
t : Finset α
ht : ↑t = univ
hn : Finset.card t = n
⊢ ∃ h, Fintype.card α = n

tactic: rintro ⟨⟨t, ht⟩, hn⟩
state_before: case mpr
α β : Type u
n : ℕ
⊢ (∃ h, Fintype.card α = n) → ∃ t, ↑t = univ ∧ Finset.card t = n

tactic: exact ⟨t, eq_univ_iff_forall.2 ht, hn⟩
state_before: case mpr.intro.mk
α β : Type u
n : ℕ
t : Finset α
ht : ∀ (x : α), x ∈ t
hn : Fintype.card α = n
⊢ ∃ t, ↑t = univ ∧ Finset.card t = n
Theorem: strictConvex_univ
File: Mathlib/Analysis/Convex/Strict.lean

tactic: intro x _ y _ _ a b _ _ _
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.3515
E : Type u_2
F : Type ?u.3521
β : Type ?u.3524
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalSpace F
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
s : Set E
x y : E
a b : 𝕜
⊢ StrictConvex 𝕜 univ

tactic: rw [interior_univ]
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.3515
E : Type u_2
F : Type ?u.3521
β : Type ?u.3524
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalSpace F
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
s : Set E
x✝ y✝ : E
a✝⁶ b✝ : 𝕜
x : E
a✝⁵ : x ∈ univ
y : E
a✝⁴ : y ∈ univ
a✝³ : x ≠ y
a b : 𝕜
a✝² : 0 < a
a✝¹ : 0 < b
a✝ : a + b = 1
⊢ a • x + b • y ∈ interior univ

tactic: exact mem_univ _
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.3515
E : Type u_2
F : Type ?u.3521
β : Type ?u.3524
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalSpace F
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
s : Set E
x✝ y✝ : E
a✝⁶ b✝ : 𝕜
x : E
a✝⁵ : x ∈ univ
y : E
a✝⁴ : y ∈ univ
a✝³ : x ≠ y
a b : 𝕜
a✝² : 0 < a
a✝¹ : 0 < b
a✝ : a + b = 1
⊢ a • x + b • y ∈ univ
Theorem: IsSelfAdjoint.mul
File: Mathlib/Algebra/Star/SelfAdjoint.lean

tactic: simp only [isSelfAdjoint_iff, star_mul', hx.star_eq, hy.star_eq]
state_before: R : Type u_1
A : Type ?u.38508
inst✝¹ : CommSemigroup R
inst✝ : StarSemigroup R
x y : R
hx : IsSelfAdjoint x
hy : IsSelfAdjoint y
⊢ IsSelfAdjoint (x * y)
Theorem: uniformEmbedding_of_spaced_out
File: Mathlib/Topology/UniformSpace/UniformEmbedding.lean

tactic: let _ : UniformSpace α := ⊥
state_before: α✝ : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α✝
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
α : Type u_1
f : α → β
s : Set (β × β)
hs : s ∈ 𝓤 β
hf : Pairwise fun x y => ¬(f x, f y) ∈ s
⊢ UniformEmbedding f

tactic: have := discreteTopology_bot α
state_before: α✝ : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α✝
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
α : Type u_1
f : α → β
s : Set (β × β)
hs : s ∈ 𝓤 β
hf : Pairwise fun x y => ¬(f x, f y) ∈ s
x✝ : UniformSpace α := ⊥
⊢ UniformEmbedding f

tactic: exact UniformInducing.uniformEmbedding ⟨comap_uniformity_of_spaced_out hs hf⟩
state_before: α✝ : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α✝
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
α : Type u_1
f : α → β
s : Set (β × β)
hs : s ∈ 𝓤 β
hf : Pairwise fun x y => ¬(f x, f y) ∈ s
x✝ : UniformSpace α := ⊥
this : DiscreteTopology α
⊢ UniformEmbedding f
Theorem: ENNReal.continuous_div_const
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: simp_rw [div_eq_mul_inv, continuous_iff_continuousAt]
state_before: α : Type ?u.104399
β : Type ?u.104402
γ : Type ?u.104405
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
⊢ Continuous fun x => x / c

tactic: intro x
state_before: α : Type ?u.104399
β : Type ?u.104402
γ : Type ?u.104405
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
⊢ ∀ (x : ℝ≥0∞), ContinuousAt (fun x => x * c⁻¹) x

tactic: exact ENNReal.continuousAt_mul_const (Or.intro_left _ (inv_ne_top.mpr c_ne_zero))
state_before: α : Type ?u.104399
β : Type ?u.104402
γ : Type ?u.104405
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x✝ y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
x : ℝ≥0∞
⊢ ContinuousAt (fun x => x * c⁻¹) x
Theorem: Opposite.unop_injective
File: Mathlib/Data/Opposite.lean

tactic: simp
state_before: α : Sort u
x✝¹ x✝ : αᵒᵖ
unop✝¹ unop✝ : α
⊢ { unop := unop✝¹ }.unop = { unop := unop✝ }.unop → { unop := unop✝¹ } = { unop := unop✝ }
Theorem: rec_heq_iff_heq
File: Mathlib/Logic/Basic.lean

tactic: subst e
state_before: α : Sort u_1
a : α
β : Sort u_2
b : α
C : α → Sort u_2
x : C a
y : β
e : a = b
⊢ HEq (e ▸ x) y ↔ HEq x y

tactic: rfl
state_before: α : Sort u_1
a : α
β : Sort u_2
C : α → Sort u_2
x : C a
y : β
⊢ HEq ((_ : a = a) ▸ x) y ↔ HEq x y
Theorem: Zsqrtd.nonnegg_pos_neg
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: rw [nonnegg_comm]
state_before: d✝ : ℤ
c d a b : ℕ
⊢ Nonnegg c d (↑a) (-↑b) ↔ SqLe b c a d

tactic: exact nonnegg_neg_pos
state_before: d✝ : ℤ
c d a b : ℕ
⊢ Nonnegg d c (-↑b) ↑a ↔ SqLe b c a d
Theorem: FormalMultilinearSeries.coeff_eq_zero
File: Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean

tactic: rw [← mkPiField_coeff_eq p, ContinuousMultilinearMap.mkPiField_eq_zero_iff]
state_before: 𝕜 : Type u
𝕜' : Type u'
E : Type v
F : Type w
G : Type x
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
s : E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
n : ℕ
z z₀ : 𝕜
y : Fin n → 𝕜
⊢ coeff p n = 0 ↔ p n = 0
Theorem: Option.map_comm
File: Mathlib/Data/Option/Basic.lean

tactic: rw [map_map, h, ← map_map]
state_before: α : Type u_1
β : Type u_3
γ : Type u_4
δ : Type u_2
f₁ : α → β
f₂ : α → γ
g₁ : β → δ
g₂ : γ → δ
h : g₁ ∘ f₁ = g₂ ∘ f₂
a : α
⊢ Option.map g₁ (Option.map f₁ (some a)) = Option.map g₂ (Option.map f₂ (some a))
Theorem: closure_diff
File: Mathlib/Topology/Basic.lean

tactic: simp only [diff_eq, inter_comm]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t✝ : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s t : Set α
⊢ closure s \ closure t = closure tᶜ ∩ closure s

tactic: simp only [diff_eq, inter_comm]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t✝ : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s t : Set α
⊢ closure (closure tᶜ ∩ s) = closure (s \ closure t)
Theorem: Fin.addCases_right
File: Mathlib/Data/Fin/Basic.lean

tactic: have : ¬(natAdd m i : ℕ) < m := (le_coe_natAdd _ _).not_lt
state_before: n✝ m✝ m n : ℕ
C : Fin (m + n) → Sort u_1
hleft : (i : Fin m) → C (↑(castAdd n) i)
hright : (i : Fin n) → C (↑(natAdd m) i)
i : Fin n
⊢ addCases hleft hright (↑(natAdd m) i) = hright i

tactic: rw [addCases, dif_neg this]
state_before: n✝ m✝ m n : ℕ
C : Fin (m + n) → Sort u_1
hleft : (i : Fin m) → C (↑(castAdd n) i)
hright : (i : Fin n) → C (↑(natAdd m) i)
i : Fin n
this : ¬↑(↑(natAdd m) i) < m
⊢ addCases hleft hright (↑(natAdd m) i) = hright i

tactic: refine' eq_of_heq ((eq_rec_heq _ _).trans _)
state_before: n✝ m✝ m n : ℕ
C : Fin (m + n) → Sort u_1
hleft : (i : Fin m) → C (↑(castAdd n) i)
hright : (i : Fin n) → C (↑(natAdd m) i)
i : Fin n
this : ¬↑(↑(natAdd m) i) < m
⊢ (_ :
        ↑(natAdd m) (subNat m (↑(cast (_ : m + n = n + m)) (↑(natAdd m) i)) (_ : m ≤ ↑(↑(natAdd m) i))) =
          ↑(natAdd m) i) ▸
      hright (subNat m (↑(cast (_ : m + n = n + m)) (↑(natAdd m) i)) (_ : m ≤ ↑(↑(natAdd m) i))) =
    hright i

tactic: congr 1
state_before: n✝ m✝ m n : ℕ
C : Fin (m + n) → Sort u_1
hleft : (i : Fin m) → C (↑(castAdd n) i)
hright : (i : Fin n) → C (↑(natAdd m) i)
i : Fin n
this : ¬↑(↑(natAdd m) i) < m
⊢ HEq (hright (subNat m (↑(cast (_ : m + n = n + m)) (↑(natAdd m) i)) (_ : m ≤ ↑(↑(natAdd m) i)))) (hright i)

tactic: simp
state_before: case e_1
n✝ m✝ m n : ℕ
C : Fin (m + n) → Sort u_1
hleft : (i : Fin m) → C (↑(castAdd n) i)
hright : (i : Fin n) → C (↑(natAdd m) i)
i : Fin n
this : ¬↑(↑(natAdd m) i) < m
⊢ subNat m (↑(cast (_ : m + n = n + m)) (↑(natAdd m) i)) (_ : m ≤ ↑(↑(natAdd m) i)) = i
Theorem: Finset.coe_eq_univ
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [← coe_univ, coe_inj]
state_before: α : Type u_1
β : Type ?u.1379
γ : Type ?u.1382
inst✝ : Fintype α
s t : Finset α
⊢ ↑s = Set.univ ↔ s = univ
Theorem: Equiv.symm_apply_eq
File: Mathlib/Logic/Equiv/Defs.lean

tactic: simp [H.symm]
state_before: α✝ : Sort u
β✝ : Sort v
γ : Sort w
α : Sort u_1
β : Sort u_2
e : α ≃ β
x : β
y : (fun x => α) x
H : ↑e.symm x = y
⊢ x = ↑e y

tactic: simp [H]
state_before: α✝ : Sort u
β✝ : Sort v
γ : Sort w
α : Sort u_1
β : Sort u_2
e : α ≃ β
x : β
y : (fun x => α) x
H : x = ↑e y
⊢ ↑e.symm x = y
Theorem: Ordinal.principal_add_iff_add_left_eq_self
File: Mathlib/SetTheory/Ordinal/Principal.lean

tactic: refine' ⟨fun ho a hao => _, fun h a b hao hbo => _⟩
state_before: o : Ordinal
⊢ Principal (fun x x_1 => x + x_1) o ↔ ∀ (a : Ordinal), a < o → a + o = o

tactic: cases' lt_or_le 1 o with ho₁ ho₁
state_before: case refine'_1
o : Ordinal
ho : Principal (fun x x_1 => x + x_1) o
a : Ordinal
hao : a < o
⊢ a + o = o

tactic: exact op_eq_self_of_principal hao (add_isNormal a) ho (principal_add_isLimit ho₁ ho)
state_before: case refine'_1.inl
o : Ordinal
ho : Principal (fun x x_1 => x + x_1) o
a : Ordinal
hao : a < o
ho₁ : 1 < o
⊢ a + o = o

tactic: rcases le_one_iff.1 ho₁ with (rfl | rfl)
state_before: case refine'_1.inr
o : Ordinal
ho : Principal (fun x x_1 => x + x_1) o
a : Ordinal
hao : a < o
ho₁ : o ≤ 1
⊢ a + o = o

tactic: exact (Ordinal.not_lt_zero a hao).elim
state_before: case refine'_1.inr.inl
a : Ordinal
ho : Principal (fun x x_1 => x + x_1) 0
hao : a < 0
ho₁ : 0 ≤ 1
⊢ a + 0 = 0

tactic: rw [lt_one_iff_zero] at hao
state_before: case refine'_1.inr.inr
a : Ordinal
ho : Principal (fun x x_1 => x + x_1) 1
hao : a < 1
ho₁ : 1 ≤ 1
⊢ a + 1 = 1

tactic: rw [hao, zero_add]
state_before: case refine'_1.inr.inr
a : Ordinal
ho : Principal (fun x x_1 => x + x_1) 1
hao : a = 0
ho₁ : 1 ≤ 1
⊢ a + 1 = 1

tactic: rw [← h a hao]
state_before: case refine'_2
o : Ordinal
h : ∀ (a : Ordinal), a < o → a + o = o
a b : Ordinal
hao : a < o
hbo : b < o
⊢ (fun x x_1 => x + x_1) a b < o

tactic: exact (add_isNormal a).strictMono hbo
state_before: case refine'_2
o : Ordinal
h : ∀ (a : Ordinal), a < o → a + o = o
a b : Ordinal
hao : a < o
hbo : b < o
⊢ (fun x x_1 => x + x_1) a b < a + o
Theorem: Setoid.classes_mkClasses
File: Mathlib/Data/Setoid/Partition.lean

tactic: rwa [show s = b from hs.symm ▸ Set.ext fun x =>
  ⟨fun hx => symm' (mkClasses c hc.2) hx b hm hb, fun hx b' hc' hx' =>
      eq_of_mem_eqv_class hc.2 hm hx hc' hx' ▸ hb⟩]
state_before: α : Type u_1
c : Set (Set α)
hc : IsPartition c
s : Set α
x✝ : s ∈ classes (mkClasses c (_ : ∀ (a : α), ∃! b x, a ∈ b))
y : α
hs : s = {x | Rel (mkClasses c (_ : ∀ (a : α), ∃! b x, a ∈ b)) x y}
b : Set α
hm : b ∈ c
hb : y ∈ b
_hy : ∀ (y_1 : Set α), y_1 ∈ c → y ∈ y_1 → y_1 = b
⊢ s ∈ c
Theorem: iteratedDeriv_one
File: Mathlib/Analysis/Calculus/IteratedDeriv.lean

tactic: ext x
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type ?u.117629
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x : 𝕜
⊢ iteratedDeriv 1 f = deriv f

tactic: simp [iteratedDeriv]
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type ?u.117629
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDeriv 1 f x = deriv f x

tactic: rfl
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type ?u.117629
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ ↑(fderiv 𝕜 f x) 1 = deriv f x
Theorem: Cardinal.add_le_add_iff_of_lt_aleph0
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: refine' ⟨fun h => _, fun h => add_le_add_right h γ⟩
state_before: α β γ : Cardinal
γ₀ : γ < ℵ₀
⊢ α + γ ≤ β + γ ↔ α ≤ β

tactic: contrapose h
state_before: α β γ : Cardinal
γ₀ : γ < ℵ₀
h : α + γ ≤ β + γ
⊢ α ≤ β

tactic: rw [not_le, lt_iff_le_and_ne, Ne] at h⊢
state_before: α β γ : Cardinal
γ₀ : γ < ℵ₀
h : ¬α ≤ β
⊢ ¬α + γ ≤ β + γ

tactic: exact ⟨add_le_add_right h.1 γ, mt (add_right_inj_of_lt_aleph0 γ₀).1 h.2⟩
state_before: α β γ : Cardinal
γ₀ : γ < ℵ₀
h : β ≤ α ∧ ¬β = α
⊢ β + γ ≤ α + γ ∧ ¬β + γ = α + γ
Theorem: MeasureTheory.Integrable.ofReal
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: rw [← memℒp_one_iff_integrable] at hf ⊢
state_before: α : Type u_1
β : Type ?u.1130946
γ : Type ?u.1130949
δ : Type ?u.1130952
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : MeasurableSpace δ
inst✝² : NormedAddCommGroup β
inst✝¹ : NormedAddCommGroup γ
𝕜 : Type u_2
inst✝ : IsROrC 𝕜
f✝ : α → 𝕜
f : α → ℝ
hf : Integrable f
⊢ Integrable fun x => ↑(f x)

tactic: exact hf.ofReal
state_before: α : Type u_1
β : Type ?u.1130946
γ : Type ?u.1130949
δ : Type ?u.1130952
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : MeasurableSpace δ
inst✝² : NormedAddCommGroup β
inst✝¹ : NormedAddCommGroup γ
𝕜 : Type u_2
inst✝ : IsROrC 𝕜
f✝ : α → 𝕜
f : α → ℝ
hf : Memℒp f 1
⊢ Memℒp (fun x => ↑(f x)) 1
Theorem: SimpleGraph.adjMatrix_mul_apply
File: Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean

tactic: simp [mul_apply, neighborFinset_eq_filter, sum_filter]
state_before: V : Type u_2
α : Type u_1
β : Type ?u.46167
G : SimpleGraph V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype V
inst✝ : NonAssocSemiring α
M : Matrix V V α
v w : V
⊢ (adjMatrix α G ⬝ M) v w = ∑ u in neighborFinset G v, M u w
Theorem: Set.preimage_mul_right_singleton
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: rw [← image_mul_right', image_singleton]
state_before: F : Type ?u.128850
α : Type u_1
β : Type ?u.128856
γ : Type ?u.128859
inst✝ : Group α
s t : Set α
a b : α
⊢ (fun x => x * a) ⁻¹' {b} = {b * a⁻¹}
Theorem: Bool.cond_decide
File: Mathlib/Data/Bool/Basic.lean

tactic: by_cases p <;> simp [*]
state_before: α : Type u_1
p : Prop
inst✝ : Decidable p
t e : α
⊢ (bif decide p then t else e) = if p then t else e
Theorem: CategoryTheory.tensor_μ_def₂
File: Mathlib/CategoryTheory/Monoidal/Braided.lean

tactic: dsimp [tensor_μ]
state_before: C : Type u₁
inst✝⁸ : Category C
inst✝⁷ : MonoidalCategory C
inst✝⁶ : BraidedCategory C
D : Type u₂
inst✝⁵ : Category D
inst✝⁴ : MonoidalCategory D
inst✝³ : BraidedCategory D
E : Type u₃
inst✝² : Category E
inst✝¹ : MonoidalCategory E
inst✝ : BraidedCategory E
X₁ X₂ Y₁ Y₂ : C
⊢ (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).hom) ≫ (α_ X₁ X₂ (Y₁ ⊗ Y₂)).inv ≫ tensor_μ C (X₁, X₂) (Y₁, Y₂) =
    (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).hom) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).inv

tactic: simp
state_before: C : Type u₁
inst✝⁸ : Category C
inst✝⁷ : MonoidalCategory C
inst✝⁶ : BraidedCategory C
D : Type u₂
inst✝⁵ : Category D
inst✝⁴ : MonoidalCategory D
inst✝³ : BraidedCategory D
E : Type u₃
inst✝² : Category E
inst✝¹ : MonoidalCategory E
inst✝ : BraidedCategory E
X₁ X₂ Y₁ Y₂ : C
⊢ (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).hom) ≫
      (α_ X₁ X₂ (Y₁ ⊗ Y₂)).inv ≫
        (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ≫
          (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ≫
            (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).hom) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).inv =
    (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).hom) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).inv
Theorem: isCoatomistic_dual_iff_isAtomistic
File: Mathlib/Order/Atoms.lean

tactic: apply h.eq_sInf_coatoms
state_before: α : Type u_1
β : Type ?u.17844
inst✝ : CompleteLattice α
h : IsCoatomistic αᵒᵈ
b : α
⊢ ∃ s, b = sSup s ∧ ∀ (a : α), a ∈ s → IsAtom a

tactic: apply h.eq_sSup_atoms
state_before: α : Type u_1
β : Type ?u.17844
inst✝ : CompleteLattice α
h : IsAtomistic α
b : αᵒᵈ
⊢ ∃ s, b = sInf s ∧ ∀ (a : αᵒᵈ), a ∈ s → IsCoatom a