tasksource/leandojo huggingface dataset:
Theorem: Sum.liftRel_swap_iff
File: Mathlib/Data/Sum/Basic.lean

tactic: rw [← swap_swap x, ← swap_swap y]
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_2
δ : Type u_1
r r₁ r₂ : α → γ → Prop
s s₁ s₂ : β → δ → Prop
a : α
b : β
c : γ
d : δ
x : α ⊕ β
y : γ ⊕ δ
h : LiftRel s r (swap x) (swap y)
⊢ LiftRel r s x y

tactic: exact h.swap
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_2
δ : Type u_1
r r₁ r₂ : α → γ → Prop
s s₁ s₂ : β → δ → Prop
a : α
b : β
c : γ
d : δ
x : α ⊕ β
y : γ ⊕ δ
h : LiftRel s r (swap x) (swap y)
⊢ LiftRel r s (swap (swap x)) (swap (swap y))
Theorem: Filter.extraction_of_frequently_atTop
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: rw [frequently_atTop'] at h
state_before: ι : Type ?u.58128
ι' : Type ?u.58131
α : Type ?u.58134
β : Type ?u.58137
γ : Type ?u.58140
P : ℕ → Prop
h : ∃ᶠ (n : ℕ) in atTop, P n
⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), P (φ n)

tactic: exact extraction_of_frequently_atTop' h
state_before: ι : Type ?u.58128
ι' : Type ?u.58131
α : Type ?u.58134
β : Type ?u.58137
γ : Type ?u.58140
P : ℕ → Prop
h : ∀ (a : ℕ), ∃ b, b > a ∧ P b
⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), P (φ n)
Theorem: Geometry.SimplicialComplex.vertex_mem_convexHull_iff
File: Mathlib/Analysis/Convex/SimplicialComplex/Basic.lean

tactic: refine' ⟨fun h => _, fun h => subset_convexHull 𝕜 _ h⟩
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.42000
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ vertices K
hs : s ∈ K.faces
⊢ x ∈ ↑(convexHull 𝕜).toOrderHom ↑s ↔ x ∈ s

tactic: classical
have h := K.inter_subset_convexHull hx hs ⟨by simp, h⟩
by_contra H
rwa [← coe_inter, Finset.disjoint_iff_inter_eq_empty.1 (Finset.disjoint_singleton_right.2 H).symm,
  coe_empty, convexHull_empty] at h
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.42000
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ vertices K
hs : s ∈ K.faces
h : x ∈ ↑(convexHull 𝕜).toOrderHom ↑s
⊢ x ∈ s

tactic: have h := K.inter_subset_convexHull hx hs ⟨by simp, h⟩
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.42000
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ vertices K
hs : s ∈ K.faces
h : x ∈ ↑(convexHull 𝕜).toOrderHom ↑s
⊢ x ∈ s

tactic: by_contra H
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.42000
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ vertices K
hs : s ∈ K.faces
h✝ : x ∈ ↑(convexHull 𝕜).toOrderHom ↑s
h : x ∈ ↑(convexHull 𝕜).toOrderHom (↑{x} ∩ ↑s)
⊢ x ∈ s

tactic: rwa [← coe_inter, Finset.disjoint_iff_inter_eq_empty.1 (Finset.disjoint_singleton_right.2 H).symm,
  coe_empty, convexHull_empty] at h
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.42000
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ vertices K
hs : s ∈ K.faces
h✝ : x ∈ ↑(convexHull 𝕜).toOrderHom ↑s
h : x ∈ ↑(convexHull 𝕜).toOrderHom (↑{x} ∩ ↑s)
H : ¬x ∈ s
⊢ False

tactic: simp
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.42000
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ vertices K
hs : s ∈ K.faces
h : x ∈ ↑(convexHull 𝕜).toOrderHom ↑s
⊢ x ∈ ↑(convexHull 𝕜).toOrderHom ↑{x}
Theorem: IsGLB.mul_right
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simpa [mul_comm] using hs.mul_left ha
state_before: ι : Type ?u.132337
α : Type u_1
β : Type ?u.132343
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
s : Set α
ha : 0 ≤ a
hs : IsGLB s b
⊢ IsGLB ((fun b => b * a) '' s) (b * a)
Theorem: IsSMulRegular.pow
File: Mathlib/Algebra/Regular/SMul.lean

tactic: induction' n with n hn
state_before: R : Type u_1
S : Type ?u.11283
M : Type u_2
a b : R
s : S
inst✝¹ : Monoid R
inst✝ : MulAction R M
n : ℕ
ra : IsSMulRegular M a
⊢ IsSMulRegular M (a ^ n)

tactic: rw [pow_zero]
state_before: case zero
R : Type u_1
S : Type ?u.11283
M : Type u_2
a b : R
s : S
inst✝¹ : Monoid R
inst✝ : MulAction R M
ra : IsSMulRegular M a
⊢ IsSMulRegular M (a ^ Nat.zero)

tactic: simp only [one]
state_before: case zero
R : Type u_1
S : Type ?u.11283
M : Type u_2
a b : R
s : S
inst✝¹ : Monoid R
inst✝ : MulAction R M
ra : IsSMulRegular M a
⊢ IsSMulRegular M 1

tactic: rw [pow_succ]
state_before: case succ
R : Type u_1
S : Type ?u.11283
M : Type u_2
a b : R
s : S
inst✝¹ : Monoid R
inst✝ : MulAction R M
ra : IsSMulRegular M a
n : ℕ
hn : IsSMulRegular M (a ^ n)
⊢ IsSMulRegular M (a ^ Nat.succ n)

tactic: exact (ra.smul_iff (a ^ n)).mpr hn
state_before: case succ
R : Type u_1
S : Type ?u.11283
M : Type u_2
a b : R
s : S
inst✝¹ : Monoid R
inst✝ : MulAction R M
ra : IsSMulRegular M a
n : ℕ
hn : IsSMulRegular M (a ^ n)
⊢ IsSMulRegular M (a * a ^ n)
Theorem: nhds_basis_opens
File: Mathlib/Topology/Basic.lean

tactic: rw [nhds_def]
state_before: α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
⊢ HasBasis (𝓝 a) (fun s => a ∈ s ∧ IsOpen s) fun s => s

tactic: exact hasBasis_biInf_principal
  (fun s ⟨has, hs⟩ t ⟨hat, ht⟩ =>
    ⟨s ∩ t, ⟨⟨has, hat⟩, IsOpen.inter hs ht⟩, ⟨inter_subset_left _ _, inter_subset_right _ _⟩⟩)
  ⟨univ, ⟨mem_univ a, isOpen_univ⟩⟩
state_before: α : Type u
β : Type v
ι : Sort w
a✝ : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
a : α
⊢ HasBasis (⨅ (s : Set α) (_ : s ∈ {s | a ∈ s ∧ IsOpen s}), 𝓟 s) (fun s => a ∈ s ∧ IsOpen s) fun s => s
Theorem: expMapCircle_zero
File: Mathlib/Analysis/Complex/Circle.lean

tactic: rw [expMapCircle_apply, ofReal_zero, MulZeroClass.zero_mul, exp_zero, Submonoid.coe_one]
state_before: ⊢ ↑(↑expMapCircle 0) = ↑1
Theorem: FiniteDimensional.finrank_le_of_rank_le
File: Mathlib/LinearAlgebra/Finrank.lean

tactic: rwa [← Cardinal.toNat_le_iff_le_of_lt_aleph0, toNat_cast] at h
state_before: K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : AddCommGroup V
inst✝² : Module K V
V₂ : Type v'
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
n : ℕ
h : Module.rank K V ≤ ↑n
⊢ finrank K V ≤ n

tactic: exact h.trans_lt (nat_lt_aleph0 n)
state_before: case hc
K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : AddCommGroup V
inst✝² : Module K V
V₂ : Type v'
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
n : ℕ
h : Module.rank K V ≤ ↑n
⊢ Module.rank K V < ℵ₀

tactic: exact nat_lt_aleph0 n
state_before: case hd
K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : AddCommGroup V
inst✝² : Module K V
V₂ : Type v'
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
n : ℕ
h : Module.rank K V ≤ ↑n
⊢ ↑n < ℵ₀
Theorem: Nat.mul_div_mul_comm_of_dvd_dvd
File: Mathlib/Data/Nat/Order/Basic.lean

tactic: rcases k.eq_zero_or_pos with (rfl | hk0)
state_before: m n k l : ℕ
hmk : k ∣ m
hnl : l ∣ n
⊢ m * n / (k * l) = m / k * (n / l)

tactic: rcases l.eq_zero_or_pos with (rfl | hl0)
state_before: case inr
m n k l : ℕ
hmk : k ∣ m
hnl : l ∣ n
hk0 : k > 0
⊢ m * n / (k * l) = m / k * (n / l)

tactic: obtain ⟨_, rfl⟩ := hmk
state_before: case inr.inr
m n k l : ℕ
hmk : k ∣ m
hnl : l ∣ n
hk0 : k > 0
hl0 : l > 0
⊢ m * n / (k * l) = m / k * (n / l)

tactic: obtain ⟨_, rfl⟩ := hnl
state_before: case inr.inr.intro
n k l : ℕ
hnl : l ∣ n
hk0 : k > 0
hl0 : l > 0
w✝ : ℕ
⊢ k * w✝ * n / (k * l) = k * w✝ / k * (n / l)

tactic: rw [mul_mul_mul_comm, Nat.mul_div_cancel_left _ hk0, Nat.mul_div_cancel_left _ hl0,
  Nat.mul_div_cancel_left _ (mul_pos hk0 hl0)]
state_before: case inr.inr.intro.intro
k l : ℕ
hk0 : k > 0
hl0 : l > 0
w✝¹ w✝ : ℕ
⊢ k * w✝¹ * (l * w✝) / (k * l) = k * w✝¹ / k * (l * w✝ / l)

tactic: simp
state_before: case inl
m n l : ℕ
hnl : l ∣ n
hmk : 0 ∣ m
⊢ m * n / (0 * l) = m / 0 * (n / l)

tactic: simp
state_before: case inr.inl
m n k : ℕ
hmk : k ∣ m
hk0 : k > 0
hnl : 0 ∣ n
⊢ m * n / (k * 0) = m / k * (n / 0)
Theorem: Composition.sizeUpTo_ofLength_le
File: Mathlib/Combinatorics/Composition.lean

tactic: dsimp [sizeUpTo]
state_before: n : ℕ
c : Composition n
i : ℕ
h : length c ≤ i
⊢ sizeUpTo c i = n

tactic: convert c.blocks_sum
state_before: n : ℕ
c : Composition n
i : ℕ
h : length c ≤ i
⊢ sum (take i c.blocks) = n

tactic: exact take_all_of_le h
state_before: case h.e'_2.h.e'_4
n : ℕ
c : Composition n
i : ℕ
h : length c ≤ i
⊢ take i c.blocks = c.blocks
Theorem: Int.cast_subNatNat
File: Mathlib/Data/Int/Cast/Basic.lean

tactic: unfold subNatNat
state_before: R : Type u
inst✝ : AddGroupWithOne R
m n : ℕ
⊢ ↑(subNatNat m n) = ↑m - ↑n

tactic: cases e : n - m
state_before: R : Type u
inst✝ : AddGroupWithOne R
m n : ℕ
⊢ ↑(match n - m with
      | 0 => ofNat (m - n)
      | succ k => -[k+1]) =
    ↑m - ↑n

tactic: simp only [ofNat_eq_coe]
state_before: case zero
R : Type u
inst✝ : AddGroupWithOne R
m n : ℕ
e : n - m = zero
⊢ ↑(match zero with
      | 0 => ofNat (m - n)
      | succ k => -[k+1]) =
    ↑m - ↑n

tactic: simp [e, Nat.le_of_sub_eq_zero e]
state_before: case zero
R : Type u
inst✝ : AddGroupWithOne R
m n : ℕ
e : n - m = zero
⊢ ↑↑(m - n) = ↑m - ↑n

tactic: rw [cast_negSucc, Nat.add_one, ← e, Nat.cast_sub <| _root_.le_of_lt <| Nat.lt_of_sub_eq_succ e,
  neg_sub]
state_before: case succ
R : Type u
inst✝ : AddGroupWithOne R
m n n✝ : ℕ
e : n - m = succ n✝
⊢ ↑(match succ n✝ with
      | 0 => ofNat (m - n)
      | succ k => -[k+1]) =
    ↑m - ↑n
Theorem: contDiffWithinAt_top
File: Mathlib/Analysis/Calculus/ContDiffDef.lean

tactic: simp only [forall_prop_of_true, le_top]
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
⊢ (∀ (m : ℕ), ↑m ≤ ⊤ → ContDiffWithinAt 𝕜 (↑m) f s x) ↔ ∀ (n : ℕ), ContDiffWithinAt 𝕜 (↑n) f s x
Theorem: Int.ediv_add_emod'
File: Std/Data/Int/DivMod.lean

tactic: rw [Int.mul_comm]
state_before: m k : Int
⊢ m / k * k + m % k = m

tactic: apply ediv_add_emod
state_before: m k : Int
⊢ k * (m / k) + m % k = m
Theorem: Matrix.zpow_sub_one
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

tactic: rw [mul_assoc, mul_eq_mul A, mul_nonsing_inv _ h, mul_one]
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit (det A)
n : ℤ
⊢ A ^ (n - 1) = A ^ (n - 1) * A * A⁻¹

tactic: rw [← zpow_add_one h, sub_add_cancel]
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit (det A)
n : ℤ
⊢ A ^ (n - 1) * A * A⁻¹ = A ^ n * A⁻¹
Theorem: geom_sum_pos_iff
File: Mathlib/Algebra/GeomSum.lean

tactic: refine' ⟨fun h => _, _⟩
state_before: α : Type u
β : Type ?u.247460
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
⊢ 0 < ∑ i in range n, x ^ i ↔ Odd n ∨ 0 < x + 1

tactic: rw [or_iff_not_imp_left, ← not_le, ← Nat.even_iff_not_odd]
state_before: case refine'_1
α : Type u
β : Type ?u.247460
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
h : 0 < ∑ i in range n, x ^ i
⊢ Odd n ∨ 0 < x + 1

tactic: refine' fun hn hx => h.not_le _
state_before: case refine'_1
α : Type u
β : Type ?u.247460
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
h : 0 < ∑ i in range n, x ^ i
⊢ Even n → ¬x + 1 ≤ 0

tactic: simpa [if_pos hn] using geom_sum_alternating_of_le_neg_one hx n
state_before: case refine'_1
α : Type u
β : Type ?u.247460
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn✝ : n ≠ 0
h : 0 < ∑ i in range n, x ^ i
hn : Even n
hx : x + 1 ≤ 0
⊢ ∑ i in range n, x ^ i ≤ 0

tactic: rintro (hn | hx')
state_before: case refine'_2
α : Type u
β : Type ?u.247460
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
⊢ Odd n ∨ 0 < x + 1 → 0 < ∑ i in range n, x ^ i

tactic: exact hn.geom_sum_pos
state_before: case refine'_2.inl
α : Type u
β : Type ?u.247460
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn✝ : n ≠ 0
hn : Odd n
⊢ 0 < ∑ i in range n, x ^ i

tactic: exact geom_sum_pos' hx' hn
state_before: case refine'_2.inr
α : Type u
β : Type ?u.247460
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
hx' : 0 < x + 1
⊢ 0 < ∑ i in range n, x ^ i
Theorem: ENNReal.tendsto_nhds
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: simp only [nhds_of_ne_top ha, tendsto_iInf, tendsto_principal]
state_before: α : Type u_1
β : Type ?u.74500
γ : Type ?u.74503
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
u : α → ℝ≥0∞
a : ℝ≥0∞
ha : a ≠ ⊤
⊢ Tendsto u f (𝓝 a) ↔ ∀ (ε : ℝ≥0∞), ε > 0 → ∀ᶠ (x : α) in f, u x ∈ Icc (a - ε) (a + ε)
Theorem: List.filterMap_join
File: Std/Data/List/Lemmas.lean

tactic: induction L <;> simp [*, filterMap_append]
state_before: α : Type u_1
β : Type u_2
f : α → Option β
L : List (List α)
⊢ filterMap f (join L) = join (map (filterMap f) L)
Theorem: mul_mem_cancel_right
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: simpa using mul_mem hba (inv_mem h)
state_before: G : Type u_1
G' : Type ?u.12139
inst✝⁶ : Group G
inst✝⁵ : Group G'
A : Type ?u.12148
inst✝⁴ : AddGroup A
M : Type ?u.12154
S : Type u_2
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
x y : G
h : x ∈ H
this : SubmonoidClass S G
hba : y * x ∈ H
⊢ y ∈ H
Theorem: CategoryTheory.MorphismProperty.RespectsIso.epimorphisms
File: Mathlib/CategoryTheory/MorphismProperty.lean

tactic: intro X Y Z e f
state_before: case right
C : Type u
inst✝¹ : Category C
D : Type ?u.61126
inst✝ : Category D
⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y), MorphismProperty.epimorphisms C f → MorphismProperty.epimorphisms C (f ≫ e.hom)

tactic: simp only [epimorphisms.iff]
state_before: case right
C : Type u
inst✝¹ : Category C
D : Type ?u.61126
inst✝ : Category D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
⊢ MorphismProperty.epimorphisms C f → MorphismProperty.epimorphisms C (f ≫ e.hom)

tactic: intro
state_before: case right
C : Type u
inst✝¹ : Category C
D : Type ?u.61126
inst✝ : Category D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
⊢ Epi f → Epi (f ≫ e.hom)

tactic: apply epi_comp
state_before: case right
C : Type u
inst✝¹ : Category C
D : Type ?u.61126
inst✝ : Category D
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
a✝ : Epi f
⊢ Epi (f ≫ e.hom)
Theorem: nnnorm_pow_le'
File: Mathlib/Analysis/Normed/Field/Basic.lean

tactic: simp only [pow_one, le_rfl]
state_before: α : Type u_1
β : Type ?u.126931
γ : Type ?u.126934
ι : Type ?u.126937
inst✝ : SeminormedRing α
a : α
x✝ : 0 < 1
⊢ ‖a ^ 1‖₊ ≤ ‖a‖₊ ^ 1

tactic: simpa only [pow_succ _ (n + 1)] using
  le_trans (nnnorm_mul_le _ _) (mul_le_mul_left' (nnnorm_pow_le' a n.succ_pos) _)
state_before: α : Type u_1
β : Type ?u.126931
γ : Type ?u.126934
ι : Type ?u.126937
inst✝ : SeminormedRing α
a : α
n : ℕ
x✝ : 0 < n + 2
⊢ ‖a ^ (n + 2)‖₊ ≤ ‖a‖₊ ^ (n + 2)
Theorem: MeasureTheory.OuterMeasure.map_top_of_surjective
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: rw [map_top, hf.range_eq, restrict_univ]
state_before: α : Type u_1
β : Type u_2
R : Type ?u.128472
R' : Type ?u.128475
ms : Set (OuterMeasure α)
m : OuterMeasure α
f : α → β
hf : Surjective f
⊢ ↑(map f) ⊤ = ⊤
Theorem: List.takeD_left
File: Mathlib/Data/List/Basic.lean

tactic: simp only [length_append, Nat.le_add_right]
state_before: ι : Type ?u.228038
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
a : α
⊢ length l₁ ≤ length (l₁ ++ l₂)
Theorem: Function.IsPeriodicPt.left_of_add
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: rw [IsPeriodicPt, iterate_add] at hn
state_before: α : Type u_1
β : Type ?u.1130
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : IsPeriodicPt f (n + m) x
hm : IsPeriodicPt f m x
⊢ IsPeriodicPt f n x

tactic: exact hn.left_of_comp hm
state_before: α : Type u_1
β : Type ?u.1130
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hn : IsFixedPt (f^[n] ∘ f^[m]) x
hm : IsPeriodicPt f m x
⊢ IsPeriodicPt f n x
Theorem: Ordinal.cof_blsub_le_lift
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rw [← mk_ordinal_out o]
state_before: α : Type ?u.38775
r : α → α → Prop
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
⊢ cof (blsub o f) ≤ Cardinal.lift (card o)

tactic: exact cof_lsub_le_lift _
state_before: α : Type ?u.38775
r : α → α → Prop
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
⊢ cof (blsub o f) ≤ Cardinal.lift (#(Quotient.out o).α)
Theorem: orderOf_dvd_iff_zpow_eq_one
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: rcases Int.eq_nat_or_neg i with ⟨i, rfl | rfl⟩
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Group G
inst✝ : AddGroup A
i : ℤ
⊢ ↑(orderOf x) ∣ i ↔ x ^ i = 1

tactic: rw [Int.coe_nat_dvd, orderOf_dvd_iff_pow_eq_one, zpow_ofNat]
state_before: case intro.inl
G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Group G
inst✝ : AddGroup A
i : ℕ
⊢ ↑(orderOf x) ∣ ↑i ↔ x ^ ↑i = 1

tactic: rw [dvd_neg, Int.coe_nat_dvd, zpow_neg, inv_eq_one, zpow_ofNat, orderOf_dvd_iff_pow_eq_one]
state_before: case intro.inr
G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Group G
inst✝ : AddGroup A
i : ℕ
⊢ ↑(orderOf x) ∣ -↑i ↔ x ^ (-↑i) = 1
Theorem: Units.inv_unique
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [h, u₂.mul_inv]
state_before: α : Type u
inst✝ : Monoid α
a b c u u₁ u₂ : αˣ
h : ↑u₁ = ↑u₂
⊢ ↑u₁ * ↑u₂⁻¹ = 1
Theorem: rank_prod'
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: simp
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.501886
inst✝¹⁰ : Ring K
inst✝⁹ : StrongRankCondition K
inst✝⁸ : AddCommGroup V
inst✝⁷ : Module K V
inst✝⁶ : Module.Free K V
inst✝⁵ : AddCommGroup V'
inst✝⁴ : Module K V'
inst✝³ : Module.Free K V'
inst✝² : AddCommGroup V₁
inst✝¹ : Module K V₁
inst✝ : Module.Free K V₁
⊢ Module.rank K (V × V₁) = Module.rank K V + Module.rank K V₁
Theorem: ZMod.valMinAbs_spec
File: Mathlib/Data/ZMod/Basic.lean

tactic: rintro rfl
state_before: n : ℕ
inst✝ : NeZero n
x : ZMod n
y : ℤ
⊢ valMinAbs x = y → x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n

tactic: exact ⟨x.coe_valMinAbs.symm, x.valMinAbs_mem_Ioc⟩
state_before: n : ℕ
inst✝ : NeZero n
x : ZMod n
⊢ x = ↑(valMinAbs x) ∧ valMinAbs x * 2 ∈ Set.Ioc (-↑n) ↑n

tactic: rw [← sub_eq_zero]
state_before: n : ℕ
inst✝ : NeZero n
x : ZMod n
y : ℤ
h : x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n
⊢ valMinAbs x = y

tactic: apply @Int.eq_zero_of_abs_lt_dvd n
state_before: n : ℕ
inst✝ : NeZero n
x : ZMod n
y : ℤ
h : x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n
⊢ valMinAbs x - y = 0

tactic: rw [← mul_lt_mul_right (@zero_lt_two ℤ _ _ _ _ _)]
state_before: case h2
n : ℕ
inst✝ : NeZero n
x : ZMod n
y : ℤ
h : x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n
⊢ abs (valMinAbs x - y) < ↑n

tactic: nth_rw 1 [← abs_eq_self.2 (@zero_le_two ℤ _ _ _ _)]
state_before: case h2
n : ℕ
inst✝ : NeZero n
x : ZMod n
y : ℤ
h : x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n
⊢ abs (valMinAbs x - y) * 2 < ↑n * 2

tactic: rw [← abs_mul, sub_mul, abs_lt]
state_before: case h2
n : ℕ
inst✝ : NeZero n
x : ZMod n
y : ℤ
h : x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n
⊢ abs (valMinAbs x - y) * abs 2 < ↑n * 2

tactic: constructor <;> linarith only [x.valMinAbs_mem_Ioc.1, x.valMinAbs_mem_Ioc.2, h.2.1, h.2.2]
state_before: case h2
n : ℕ
inst✝ : NeZero n
x : ZMod n
y : ℤ
h : x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n
⊢ -(↑n * 2) < valMinAbs x * 2 - y * 2 ∧ valMinAbs x * 2 - y * 2 < ↑n * 2

tactic: rw [← int_cast_zmod_eq_zero_iff_dvd, Int.cast_sub, coe_valMinAbs, h.1, sub_self]
state_before: case h1
n : ℕ
inst✝ : NeZero n
x : ZMod n
y : ℤ
h : x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n
⊢ ↑n ∣ valMinAbs x - y
Theorem: Subgroup.coe_transferFunction
File: Mathlib/GroupTheory/Complement.lean

tactic: rw [transferFunction_apply, ← smul_eq_mul, Quotient.coe_smul_out',
  ← quotientEquivSigmaZMod_symm_apply, Sigma.eta, symm_apply_apply]
state_before: G : Type u
inst✝ : Group G
H : Subgroup G
g : G
q : G ⧸ H
⊢ ↑(transferFunction H g q) = q
Theorem: UniformSpace.comap_comap
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: ext1
state_before: α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort ?u.137464
α : Type u_1
β : Type u_2
γ : Type u_3
uγ : UniformSpace γ
f : α → β
g : β → γ
⊢ comap (g ∘ f) uγ = comap f (comap g uγ)

tactic: simp only [uniformity_comap, Filter.comap_comap, Prod.map_comp_map]
state_before: case a
α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort ?u.137464
α : Type u_1
β : Type u_2
γ : Type u_3
uγ : UniformSpace γ
f : α → β
g : β → γ
⊢ 𝓤 α = 𝓤 α
Theorem: geom_sum_pos
File: Mathlib/Algebra/GeomSum.lean

tactic: simp
state_before: α : Type u
β : Type ?u.227121
n : ℕ
x : α
inst✝ : StrictOrderedSemiring α
hx : 0 ≤ x
hn : n ≠ 0
⊢ 0 < x ^ 0
Theorem: Partrec.option_casesOn_right
File: Mathlib/Computability/Partrec.lean

tactic: cases' o a with b <;> simp [encodek]
state_before: α : Type u_3
β : Type u_1
γ : Type ?u.213941
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
o : α → Option β
f : α → σ
g : α → β →. σ
ho : Computable o
hf : Computable f
hg : Partrec₂ g
this : Partrec fun a => Nat.casesOn (encode (o a)) (Part.some (f a)) fun n => Part.bind (↑(decode n)) (g a)
a : α
⊢ (Nat.casesOn (encode (o a)) (Part.some (f a)) fun n => Part.bind (↑(decode n)) (g a)) =
    Option.casesOn (o a) (Part.some (f a)) (g a)
Theorem: Finset.inf_sdiff_left
File: Mathlib/Data/Finset/Lattice.lean

tactic: induction' hs using Finset.Nonempty.cons_induction with b b t _ _ h
state_before: F : Type ?u.199570
α : Type u_2
β : Type ?u.199576
γ : Type ?u.199579
ι : Type u_1
κ : Type ?u.199585
inst✝ : BooleanAlgebra α
s : Finset ι
hs : Finset.Nonempty s
f : ι → α
a : α
⊢ (inf s fun b => a \ f b) = a \ sup s f

tactic: rw [sup_singleton, inf_singleton]
state_before: case h₀
F : Type ?u.199570
α : Type u_2
β : Type ?u.199576
γ : Type ?u.199579
ι : Type u_1
κ : Type ?u.199585
inst✝ : BooleanAlgebra α
s : Finset ι
f : ι → α
a : α
b : ι
⊢ (inf {b} fun b => a \ f b) = a \ sup {b} f

tactic: rw [sup_cons, inf_cons, h, sdiff_sup]
state_before: case h₁
F : Type ?u.199570
α : Type u_2
β : Type ?u.199576
γ : Type ?u.199579
ι : Type u_1
κ : Type ?u.199585
inst✝ : BooleanAlgebra α
s : Finset ι
f : ι → α
a : α
b : ι
t : Finset ι
h✝ : ¬b ∈ t
hs✝ : Finset.Nonempty t
h : (inf t fun b => a \ f b) = a \ sup t f
⊢ (inf (cons b t h✝) fun b => a \ f b) = a \ sup (cons b t h✝) f
Theorem: vadd_right_mem_affineSpan_pair
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [vadd_mem_iff_mem_direction _ (right_mem_affineSpan_pair _ _ _), direction_affineSpan,
  mem_vectorSpan_pair]
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.479075
p₁ p₂ : P
v : V
⊢ v +ᵥ p₂ ∈ affineSpan k {p₁, p₂} ↔ ∃ r, r • (p₁ -ᵥ p₂) = v
Theorem: MeasureTheory.snorm'_mono_nnnorm_ae
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [snorm']
state_before: α : Type u_1
E : Type ?u.1274624
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
hq : 0 ≤ q
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ ‖g x‖₊
⊢ snorm' f q μ ≤ snorm' g q μ

tactic: refine' ENNReal.rpow_le_rpow _ (one_div_nonneg.2 hq)
state_before: α : Type u_1
E : Type ?u.1274624
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
hq : 0 ≤ q
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ ‖g x‖₊
⊢ (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) ^ (1 / q) ≤ snorm' g q μ

tactic: refine' lintegral_mono_ae (h.mono fun x hx => _)
state_before: α : Type u_1
E : Type ?u.1274624
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
hq : 0 ≤ q
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ ‖g x‖₊
⊢ (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) ≤ ∫⁻ (a : α), ↑‖g a‖₊ ^ q ∂μ

tactic: exact ENNReal.rpow_le_rpow (ENNReal.coe_le_coe.2 hx) hq
state_before: α : Type u_1
E : Type ?u.1274624
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
hq : 0 ≤ q
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ ‖g x‖₊
x : α
hx : ‖f x‖₊ ≤ ‖g x‖₊
⊢ ↑‖f x‖₊ ^ q ≤ ↑‖g x‖₊ ^ q