ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- PNat.gcd_props
theorem gcd_props :
    let d := gcdD a b
    let w := gcdW a b
    let x := gcdX a b
    let y := gcdY a b
    let z := gcdZ a b
    let a' := gcdA' a b
    let b' := gcdB' a b
    w * z = succPNat (x * y) ∧
      a = a' * d ∧
        b = b' * d ∧
          z * a' = succPNat (x * b') ∧
            w * b' = succPNat (y * a') ∧ (z * a : ℕ) = x * b + d ∧ (w * b : ℕ) = y * a + d 
Arguments: (a b : ℕ+)
Goal: let d := a.gcdD b;
let w := a.gcdW b;
let x := a.gcdX b;
let y := a.gcdY b;
let z := a.gcdZ b;
let a' := a.gcdA' b;
let b' := a.gcdB' b;
w * z = (x * y).succPNat ∧
  a = a' * d ∧
    b = b' * d ∧
      z * a' = (x * ↑b').succPNat ∧ w * b' = (y * ↑a').succPNat ∧ ↑z * ↑a = x * ↑b + ↑d ∧ ↑w * ↑b = y * ↑a + ↑d
-- PNat.gcd_eq
theorem gcd_eq : gcdD a b = gcd a b 
Arguments: (a b : ℕ+)
Goal: a.gcdD b = a.gcd b
-- PNat.gcd_det_eq
theorem gcd_det_eq : gcdW a b * gcdZ a b = succPNat (gcdX a b * gcdY a b) 
Arguments: (a b : ℕ+)
Goal: a.gcdW b * a.gcdZ b = (a.gcdX b * a.gcdY b).succPNat
-- PNat.gcd_a_eq
theorem gcd_a_eq : a = gcdA' a b * gcd a b 
Arguments: (a b : ℕ+)
Goal: a = a.gcdA' b * a.gcd b
-- PNat.gcd_b_eq
theorem gcd_b_eq : b = gcdB' a b * gcd a b 
Arguments: (a b : ℕ+)
Goal: b = a.gcdB' b * a.gcd b
-- PNat.gcd_rel_left'
theorem gcd_rel_left' : gcdZ a b * gcdA' a b = succPNat (gcdX a b * gcdB' a b) 
Arguments: (a b : ℕ+)
Goal: a.gcdZ b * a.gcdA' b = (a.gcdX b * ↑(a.gcdB' b)).succPNat
-- PNat.gcd_rel_right'
theorem gcd_rel_right' : gcdW a b * gcdB' a b = succPNat (gcdY a b * gcdA' a b) 
Arguments: (a b : ℕ+)
Goal: a.gcdW b * a.gcdB' b = (a.gcdY b * ↑(a.gcdA' b)).succPNat
-- PNat.gcd_rel_left
theorem gcd_rel_left : (gcdZ a b * a : ℕ) = gcdX a b * b + gcd a b 
Arguments: (a b : ℕ+)
Goal: ↑(a.gcdZ b) * ↑a = a.gcdX b * ↑b + ↑(a.gcd b)
-- PNat.gcd_rel_right
theorem gcd_rel_right : (gcdW a b * b : ℕ) = gcdY a b * a + gcd a b 
Arguments: (a b : ℕ+)
Goal: ↑(a.gcdW b) * ↑b = a.gcdY b * ↑a + ↑(a.gcd b)
-- toDual_natCast
@[simp]
theorem toDual_natCast [NatCast α] (n : ℕ) : toDual (n : α) = n 
Arguments: {α : Type u_1} [NatCast α] (n : ℕ)
Goal: OrderDual.toDual ↑n = ↑n
-- toDual_ofNat
@[simp]
theorem toDual_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    (toDual (no_index (OfNat.ofNat n : α))) = OfNat.ofNat n 
Arguments: {α : Type u_1} [NatCast α] (n : ℕ) [n.AtLeastTwo]
Goal: OrderDual.toDual (OfNat.ofNat n) = OfNat.ofNat n
-- ofDual_natCast
@[simp]
theorem ofDual_natCast [NatCast α] (n : ℕ) : (ofDual n : α) = n 
Arguments: {α : Type u_1} [NatCast α] (n : ℕ)
Goal: OrderDual.ofDual ↑n = ↑n
-- ofDual_ofNat
@[simp]
theorem ofDual_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    (ofDual (no_index (OfNat.ofNat n : αᵒᵈ))) = OfNat.ofNat n 
Arguments: {α : Type u_1} [NatCast α] (n : ℕ) [n.AtLeastTwo]
Goal: OrderDual.ofDual (OfNat.ofNat n) = OfNat.ofNat n
-- toLex_natCast
@[simp]
theorem toLex_natCast [NatCast α] (n : ℕ) : toLex (n : α) = n 
Arguments: {α : Type u_1} [NatCast α] (n : ℕ)
Goal: toLex ↑n = ↑n
-- toLex_ofNat
@[simp]
theorem toLex_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    (toLex (no_index (OfNat.ofNat n : α))) = OfNat.ofNat n 
Arguments: {α : Type u_1} [NatCast α] (n : ℕ) [n.AtLeastTwo]
Goal: toLex (OfNat.ofNat n) = OfNat.ofNat n
-- ofLex_natCast
@[simp]
theorem ofLex_natCast [NatCast α] (n : ℕ) : (ofLex n : α) = n 
Arguments: {α : Type u_1} [NatCast α] (n : ℕ)
Goal: ofLex ↑n = ↑n
-- ofLex_ofNat
@[simp]
theorem ofLex_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    (ofLex (no_index (OfNat.ofNat n : Lex α))) = OfNat.ofNat n 
Arguments: {α : Type u_1} [NatCast α] (n : ℕ) [n.AtLeastTwo]
Goal: ofLex (OfNat.ofNat n) = OfNat.ofNat n
-- Prod.fst_natCast
@[simp]
theorem fst_natCast (n : ℕ) : (n : α × β).fst = n 
Arguments: {α : Type u_1} {β : Type u_2} [AddMonoidWithOne α] [AddMonoidWithOne β] (n : ℕ)
Goal: (↑n).1 = ↑n
-- Prod.fst_ofNat
@[simp]
theorem fst_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : α × β)).1 = (OfNat.ofNat n : α) 
Arguments: {α : Type u_1} {β : Type u_2} [AddMonoidWithOne α] [AddMonoidWithOne β] (n : ℕ) [n.AtLeastTwo]
Goal: (OfNat.ofNat n).1 = OfNat.ofNat n
-- Prod.snd_natCast
@[simp]
theorem snd_natCast (n : ℕ) : (n : α × β).snd = n 
Arguments: {α : Type u_1} {β : Type u_2} [AddMonoidWithOne α] [AddMonoidWithOne β] (n : ℕ)
Goal: (↑n).2 = ↑n
-- Prod.snd_ofNat
@[simp]
theorem snd_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : α × β)).2 = (OfNat.ofNat n : β) 
Arguments: {α : Type u_1} {β : Type u_2} [AddMonoidWithOne α] [AddMonoidWithOne β] (n : ℕ) [n.AtLeastTwo]
Goal: (OfNat.ofNat n).2 = OfNat.ofNat n
-- Nat.cast_commute
theorem cast_commute (n : ℕ) (x : α) : Commute (n : α) x 
Arguments: {α : Type u_1} [NonAssocSemiring α] (n : ℕ) (x : α)
Goal: Commute (↑n) x
-- Commute.ofNat_left
theorem _root_.Commute.ofNat_left (n : ℕ) [n.AtLeastTwo] (x : α) : Commute (OfNat.ofNat n) x 
Arguments: {α : Type u_1} [NonAssocSemiring α] (n : ℕ) [n.AtLeastTwo] (x : α)
Goal: Commute (OfNat.ofNat n) x
-- Nat.cast_comm
theorem cast_comm (n : ℕ) (x : α) : (n : α) * x = x * n 
Arguments: {α : Type u_1} [NonAssocSemiring α] (n : ℕ) (x : α)
Goal: ↑n * x = x * ↑n
-- Nat.commute_cast
theorem commute_cast (x : α) (n : ℕ) : Commute x n 
Arguments: {α : Type u_1} [NonAssocSemiring α] (x : α) (n : ℕ)
Goal: Commute x ↑n
-- Commute.ofNat_right
theorem _root_.Commute.ofNat_right (x : α) (n : ℕ) [n.AtLeastTwo] : Commute x (OfNat.ofNat n) 
Arguments: {α : Type u_1} [NonAssocSemiring α] (x : α) (n : ℕ) [n.AtLeastTwo]
Goal: Commute x (OfNat.ofNat n)
-- SemiconjBy.natCast_mul_right
@[simp]
lemma natCast_mul_right (h : SemiconjBy a x y) (n : ℕ) : SemiconjBy a (n * x) (n * y) 
Arguments: {α : Type u_1} [Semiring α] {a x y : α} (h : SemiconjBy a x y) (n : ℕ)
Goal: SemiconjBy a (↑n * x) (↑n * y)
-- SemiconjBy.natCast_mul_left
@[simp]
lemma natCast_mul_left (h : SemiconjBy a x y) (n : ℕ) : SemiconjBy (n * a) x y 
Arguments: {α : Type u_1} [Semiring α] {a x y : α} (h : SemiconjBy a x y) (n : ℕ)
Goal: SemiconjBy (↑n * a) x y
-- SemiconjBy.natCast_mul_natCast_mul
@[simp]
lemma natCast_mul_natCast_mul (h : SemiconjBy a x y) (m n : ℕ) :
    SemiconjBy (m * a) (n * x) (n * y) 
Arguments: {α : Type u_1} [Semiring α] {a x y : α} (h : SemiconjBy a x y) (m n : ℕ)
Goal: SemiconjBy (↑m * a) (↑n * x) (↑n * y)
-- Commute.natCast_mul_right
@[simp] lemma natCast_mul_right (h : Commute a b) (n : ℕ) : Commute a (n * b) 
Arguments: {α : Type u_1} [Semiring α] {a b : α} (h : Commute a b) (n : ℕ)
Goal: Commute a (↑n * b)
-- Commute.natCast_mul_left
@[simp] lemma natCast_mul_left (h : Commute a b) (n : ℕ) : Commute (n * a) b 
Arguments: {α : Type u_1} [Semiring α] {a b : α} (h : Commute a b) (n : ℕ)
Goal: Commute (↑n * a) b
-- Commute.natCast_mul_natCast_mul
@[simp] lemma natCast_mul_natCast_mul (h : Commute a b) (m n : ℕ) : Commute (m * a) (n * b) 
Arguments: {α : Type u_1} [Semiring α] {a b : α} (h : Commute a b) (m n : ℕ)
Goal: Commute (↑m * a) (↑n * b)
-- Commute.self_natCast_mul
lemma self_natCast_mul : Commute a (n * a) 
Arguments: {α : Type u_1} [Semiring α] (a : α) (n : ℕ)
Goal: Commute a (↑n * a)
-- Commute.natCast_mul_self
lemma natCast_mul_self : Commute (n * a) a 
Arguments: {α : Type u_1} [Semiring α] (a : α) (n : ℕ)
Goal: Commute (↑n * a) a
-- Commute.self_natCast_mul_natCast_mul
lemma self_natCast_mul_natCast_mul : Commute (m * a) (n * a) 
Arguments: {α : Type u_1} [Semiring α] (a : α) (m n : ℕ)
Goal: Commute (↑m * a) (↑n * a)
-- Fin.val_injective
theorem val_injective : Function.Injective (@Fin.val n) 
Arguments: {n : ℕ}
Goal: Function.Injective Fin.val
-- Fin.size_positive
lemma size_positive : Fin n → 0 < n 
Arguments: {n : ℕ}
Goal: Fin n → 0 < n
-- Fin.size_positive'
lemma size_positive' [Nonempty (Fin n)] : 0 < n 
Arguments: {n : ℕ} [Nonempty (Fin n)]
Goal: 0 < n
-- Fin.prop
protected theorem prop (a : Fin n) : a.val < n 
Arguments: {n : ℕ} (a : Fin n)
Goal: ↑a < n
-- Fin.lt_of_le_of_lt
protected lemma lt_of_le_of_lt : a ≤ b → b < c → a < c 
Arguments: {n : ℕ} {a b c : Fin n}
Goal: a ≤ b → b < c → a < c
-- Fin.lt_of_lt_of_le
protected lemma lt_of_lt_of_le : a < b → b ≤ c → a < c 
Arguments: {n : ℕ} {a b c : Fin n}
Goal: a < b → b ≤ c → a < c
-- Fin.le_rfl
protected lemma le_rfl : a ≤ a 
Arguments: {n : ℕ} {a : Fin n}
Goal: a ≤ a
-- Fin.lt_iff_le_and_ne
protected lemma lt_iff_le_and_ne : a < b ↔ a ≤ b ∧ a ≠ b 
Arguments: {n : ℕ} {a b : Fin n}
Goal: a < b ↔ a ≤ b ∧ a ≠ b
-- Fin.lt_or_lt_of_ne
protected lemma lt_or_lt_of_ne (h : a ≠ b) : a < b ∨ b < a 
Arguments: {n : ℕ} {a b : Fin n} (h : a ≠ b)
Goal: a < b ∨ b < a
-- Fin.lt_or_le
protected lemma lt_or_le (a b : Fin n) : a < b ∨ b ≤ a 
Arguments: {n : ℕ} (a b : Fin n)
Goal: a < b ∨ b ≤ a
-- Fin.le_or_lt
protected lemma le_or_lt (a b : Fin n) : a ≤ b ∨ b < a 
Arguments: {n : ℕ} (a b : Fin n)
Goal: a ≤ b ∨ b < a
-- Fin.le_of_eq
protected lemma le_of_eq (hab : a = b) : a ≤ b 
Arguments: {n : ℕ} {a b : Fin n} (hab : a = b)
Goal: a ≤ b
-- Fin.ge_of_eq
protected lemma ge_of_eq (hab : a = b) : b ≤ a 
Arguments: {n : ℕ} {a b : Fin n} (hab : a = b)
Goal: b ≤ a
-- Fin.eq_or_lt_of_le
protected lemma eq_or_lt_of_le : a ≤ b → a = b ∨ a < b 
Arguments: {n : ℕ} {a b : Fin n}
Goal: a ≤ b → a = b ∨ a < b
-- Fin.lt_or_eq_of_le
protected lemma lt_or_eq_of_le : a ≤ b → a < b ∨ a = b 
Arguments: {n : ℕ} {a b : Fin n}
Goal: a ≤ b → a < b ∨ a = b
-- Fin.lt_last_iff_ne_last
lemma lt_last_iff_ne_last {a : Fin (n + 1)} : a < last n ↔ a ≠ last n 
Arguments: {n : ℕ} {a : Fin (n + 1)}
Goal: a < Fin.last n ↔ a ≠ Fin.last n
-- Fin.ne_zero_of_lt
lemma ne_zero_of_lt {a b : Fin (n + 1)} (hab : a < b) : b ≠ 0 
Arguments: {n : ℕ} {a b : Fin (n + 1)} (hab : a < b)
Goal: b ≠ 0
-- Fin.ne_last_of_lt
lemma ne_last_of_lt {a b : Fin (n + 1)} (hab : a < b) : a ≠ last n 
Arguments: {n : ℕ} {a b : Fin (n + 1)} (hab : a < b)
Goal: a ≠ Fin.last n
-- Fin.equivSubtype_symm_apply
@[simps apply symm_apply]
def equivSubtype : Fin n ≃ { i // i < n } 
Arguments: {n : ℕ} (a : { i // i < n })
Goal: Fin.equivSubtype.symm a = ⟨↑a, ⋯⟩
-- Fin.equivSubtype_apply
@[simps apply symm_apply]
def equivSubtype : Fin n ≃ { i // i < n } 
Arguments: {n : ℕ} (a : Fin n)
Goal: Fin.equivSubtype a = ⟨↑a, ⋯⟩
-- Fin.val_eq_val
theorem val_eq_val (a b : Fin n) : (a : ℕ) = b ↔ a = b 
Arguments: {n : ℕ} (a b : Fin n)
Goal: ↑a = ↑b ↔ a = b
-- Fin.eq_iff_veq
@[deprecated Fin.ext_iff (since := "2024-02-20")]
theorem eq_iff_veq (a b : Fin n) : a = b ↔ a.1 = b.1 
Arguments: {n : ℕ} (a b : Fin n)
Goal: a = b ↔ ↑a = ↑b
-- Fin.ne_iff_vne
theorem ne_iff_vne (a b : Fin n) : a ≠ b ↔ a.1 ≠ b.1 
Arguments: {n : ℕ} (a b : Fin n)
Goal: a ≠ b ↔ ↑a ≠ ↑b
-- Fin.mk_eq_mk
@[simp, nolint simpNF]
theorem mk_eq_mk {a h a' h'} : @mk n a h = @mk n a' h' ↔ a = a' 
Arguments: {n a : ℕ} {h : a < n} {a' : ℕ} {h' : a' < n}
Goal: ⟨a, h⟩ = ⟨a', h'⟩ ↔ a = a'
-- Fin.heq_fun_iff
protected theorem heq_fun_iff {α : Sort*} {k l : ℕ} (h : k = l) {f : Fin k → α} {g : Fin l → α} :
    HEq f g ↔ ∀ i : Fin k, f i = g ⟨(i : ℕ), h ▸ i.2⟩ 
Arguments: {α : Sort u_1} {k l : ℕ} (h : k = l) {f : Fin k → α} {g : Fin l → α}
Goal: HEq f g ↔ ∀ (i : Fin k), f i = g ⟨↑i, ⋯⟩
-- Fin.heq_fun₂_iff
protected theorem heq_fun₂_iff {α : Sort*} {k l k' l' : ℕ} (h : k = l) (h' : k' = l')
    {f : Fin k → Fin k' → α} {g : Fin l → Fin l' → α} :
    HEq f g ↔ ∀ (i : Fin k) (j : Fin k'), f i j = g ⟨(i : ℕ), h ▸ i.2⟩ ⟨(j : ℕ), h' ▸ j.2⟩ 
Arguments: {α : Sort u_1} {k l k' l' : ℕ} (h : k = l) (h' : k' = l') {f : Fin k → Fin k' → α} {g : Fin l → Fin l' → α}
Goal: HEq f g ↔ ∀ (i : Fin k) (j : Fin k'), f i j = g ⟨↑i, ⋯⟩ ⟨↑j, ⋯⟩
-- Fin.heq_ext_iff
protected theorem heq_ext_iff {k l : ℕ} (h : k = l) {i : Fin k} {j : Fin l} :
    HEq i j ↔ (i : ℕ) = (j : ℕ) 
Arguments: {k l : ℕ} (h : k = l) {i : Fin k} {j : Fin l}
Goal: HEq i j ↔ ↑i = ↑j
-- Fin.le_iff_val_le_val
theorem le_iff_val_le_val {a b : Fin n} : a ≤ b ↔ (a : ℕ) ≤ b 
Arguments: {n : ℕ} {a b : Fin n}
Goal: a ≤ b ↔ ↑a ≤ ↑b
-- Fin.val_fin_lt
@[norm_cast, simp]
theorem val_fin_lt {n : ℕ} {a b : Fin n} : (a : ℕ) < (b : ℕ) ↔ a < b 
Arguments: {n : ℕ} {a b : Fin n}
Goal: ↑a < ↑b ↔ a < b
-- Fin.val_fin_le
@[norm_cast, simp]
theorem val_fin_le {n : ℕ} {a b : Fin n} : (a : ℕ) ≤ (b : ℕ) ↔ a ≤ b 
Arguments: {n : ℕ} {a b : Fin n}
Goal: ↑a ≤ ↑b ↔ a ≤ b
-- Fin.min_val
theorem min_val {a : Fin n} : min (a : ℕ) n = a 
Arguments: {n : ℕ} {a : Fin n}
Goal: min (↑a) n = ↑a
-- Fin.max_val
theorem max_val {a : Fin n} : max (a : ℕ) n = n 
Arguments: {n : ℕ} {a : Fin n}
Goal: max (↑a) n = n
-- Fin.valEmbedding_apply
@[simps apply]
def valEmbedding : Fin n ↪ ℕ 
Arguments: {n : ℕ} (self : Fin n)
Goal: Fin.valEmbedding self = ↑self
-- Fin.equivSubtype_symm_trans_valEmbedding
@[simp]
theorem equivSubtype_symm_trans_valEmbedding :
    equivSubtype.symm.toEmbedding.trans valEmbedding = Embedding.subtype (· < n) 
Arguments: {n : ℕ}
Goal: Fin.equivSubtype.symm.toEmbedding.trans Fin.valEmbedding = Function.Embedding.subtype fun x => x < n
-- Fin.val_zero'
@[simp]
theorem val_zero' (n : ℕ) [NeZero n] : ((0 : Fin n) : ℕ) = 0 
Arguments: (n : ℕ) [NeZero n]
Goal: ↑0 = 0
-- Fin.zero_le'
@[simp]
protected theorem zero_le' [NeZero n] (a : Fin n) : 0 ≤ a 
Arguments: {n : ℕ} [NeZero n] (a : Fin n)
Goal: 0 ≤ a
-- Fin.pos_iff_ne_zero'
theorem pos_iff_ne_zero' [NeZero n] (a : Fin n) : 0 < a ↔ a ≠ 0 
Arguments: {n : ℕ} [NeZero n] (a : Fin n)
Goal: 0 < a ↔ a ≠ 0
-- Fin.cast_eq_self
@[simp] lemma cast_eq_self (a : Fin n) : cast rfl a = a 
Arguments: {n : ℕ} (a : Fin n)
Goal: Fin.cast ⋯ a = a
-- Fin.rev_involutive
theorem rev_involutive : Involutive (rev : Fin n → Fin n) 
Arguments: {n : ℕ}
Goal: Function.Involutive Fin.rev
-- Fin.revPerm_apply
@[simps! apply symm_apply]
def revPerm : Equiv.Perm (Fin n) 
Arguments: {n : ℕ} (i : Fin n)
Goal: Fin.revPerm i = i.rev
-- Fin.revPerm_symm_apply
@[simps! apply symm_apply]
def revPerm : Equiv.Perm (Fin n) 
Arguments: {n : ℕ} (i : Fin n)
Goal: (Equiv.symm Fin.revPerm) i = i.rev
-- Fin.rev_injective
theorem rev_injective : Injective (@rev n) 
Arguments: {n : ℕ}
Goal: Function.Injective Fin.rev
-- Fin.rev_surjective
theorem rev_surjective : Surjective (@rev n) 
Arguments: {n : ℕ}
Goal: Function.Surjective Fin.rev
-- Fin.rev_bijective
theorem rev_bijective : Bijective (@rev n) 
Arguments: {n : ℕ}
Goal: Function.Bijective Fin.rev
-- Fin.revPerm_symm
@[simp]
theorem revPerm_symm : (@revPerm n).symm = revPerm 
Arguments: {n : ℕ}
Goal: Equiv.symm Fin.revPerm = Fin.revPerm
-- Fin.cast_rev
theorem cast_rev (i : Fin n) (h : n = m) :
    cast h i.rev = (i.cast h).rev 
Arguments: {n m : ℕ} (i : Fin n) (h : n = m)
Goal: Fin.cast h i.rev = (Fin.cast h i).rev
-- Fin.rev_eq_iff
theorem rev_eq_iff {i j : Fin n} : rev i = j ↔ i = rev j 
Arguments: {n : ℕ} {i j : Fin n}
Goal: i.rev = j ↔ i = j.rev
-- Fin.rev_ne_iff
theorem rev_ne_iff {i j : Fin n} : rev i ≠ j ↔ i ≠ rev j 
Arguments: {n : ℕ} {i j : Fin n}
Goal: i.rev ≠ j ↔ i ≠ j.rev
-- Fin.rev_lt_iff
theorem rev_lt_iff {i j : Fin n} : rev i < j ↔ rev j < i 
Arguments: {n : ℕ} {i j : Fin n}
Goal: i.rev < j ↔ j.rev < i
-- Fin.rev_le_iff
theorem rev_le_iff {i j : Fin n} : rev i ≤ j ↔ rev j ≤ i 
Arguments: {n : ℕ} {i j : Fin n}
Goal: i.rev ≤ j ↔ j.rev ≤ i
-- Fin.lt_rev_iff
theorem lt_rev_iff {i j : Fin n} : i < rev j ↔ j < rev i 
Arguments: {n : ℕ} {i j : Fin n}
Goal: i < j.rev ↔ j < i.rev
-- Fin.le_rev_iff
theorem le_rev_iff {i j : Fin n} : i ≤ rev j ↔ j ≤ rev i 
Arguments: {n : ℕ} {i j : Fin n}
Goal: i ≤ j.rev ↔ j ≤ i.rev
-- Fin.val_rev_zero
@[simp] theorem val_rev_zero [NeZero n] : ((rev 0 : Fin n) : ℕ) = n.pred 
Arguments: {n : ℕ} [NeZero n]
Goal: ↑(Fin.rev 0) = n.pred
-- Fin.last_pos'
theorem last_pos' [NeZero n] : 0 < last n 
Arguments: {n : ℕ} [NeZero n]
Goal: 0 < Fin.last n
-- Fin.one_lt_last
theorem one_lt_last [NeZero n] : 1 < last (n + 1) 
Arguments: {n : ℕ} [NeZero n]
Goal: 1 < Fin.last (n + 1)
-- Fin.val_one'
@[simp]
theorem val_one' (n : ℕ) [NeZero n] : ((1 : Fin n) : ℕ) = 1 % n 
Arguments: (n : ℕ) [NeZero n]
Goal: ↑1 = 1 % n
-- Fin.val_one''
theorem val_one'' {n : ℕ} : ((1 : Fin (n + 1)) : ℕ) = 1 % (n + 1) 
Arguments: {n : ℕ}
Goal: ↑1 = 1 % (n + 1)
-- Fin.nontrivial_iff_two_le
theorem nontrivial_iff_two_le : Nontrivial (Fin n) ↔ 2 ≤ n 
Arguments: {n : ℕ}
Goal: Nontrivial (Fin n) ↔ 2 ≤ n
-- Fin.add_zero
protected theorem add_zero [NeZero n] (k : Fin n) : k + 0 = k 
Arguments: {n : ℕ} [NeZero n] (k : Fin n)
Goal: k + 0 = k
-- Fin.zero_add
protected theorem zero_add [NeZero n] (k : Fin n) : 0 + k = k 
Arguments: {n : ℕ} [NeZero n] (k : Fin n)
Goal: 0 + k = k
-- Fin.default_eq_zero
@[simp]
theorem default_eq_zero (n : ℕ) [NeZero n] : (default : Fin n) = 0 
Arguments: (n : ℕ) [NeZero n]
Goal: default = 0
-- Fin.ofNat'_zero
@[simp] lemma ofNat'_zero {h : 0 < n} [NeZero n] : (Fin.ofNat' 0 h : Fin n) = 0 
Arguments: {n : ℕ} {h : 0 < n} [NeZero n]
Goal: Fin.ofNat' 0 h = 0
-- Fin.ofNat'_one
@[simp] lemma ofNat'_one {h : 0 < n} [NeZero n] : (Fin.ofNat' 1 h : Fin n) = 1 
Arguments: {n : ℕ} {h : 0 < n} [NeZero n]
Goal: Fin.ofNat' 1 h = 1
-- Fin.natCast_def
lemma natCast_def [NeZero n] (a : ℕ) : (a : Fin n) = ⟨a % n, mod_lt _ n.pos_of_neZero⟩ 
Arguments: {n : ℕ} [NeZero n] (a : ℕ)
Goal: ↑a = ⟨a % n, ⋯⟩
-- Fin.val_add_eq_ite
theorem val_add_eq_ite {n : ℕ} (a b : Fin n) :
    (↑(a + b) : ℕ) = if n ≤ a + b then a + b - n else a + b 
Arguments: {n : ℕ} (a b : Fin n)
Goal: ↑(a + b) = if n ≤ ↑a + ↑b then ↑a + ↑b - n else ↑a + ↑b
-- Fin.ofNat''_eq_cast
@[simp]
theorem ofNat''_eq_cast (n : ℕ) [NeZero n] (a : ℕ) : (Fin.ofNat'' a : Fin n) = a 
Arguments: (n : ℕ) [NeZero n] (a : ℕ)
Goal: Fin.ofNat'' a = ↑a
-- Fin.val_natCast
@[simp] lemma val_natCast (a n : ℕ) [NeZero n] : (a : Fin n).val = a % n 
Arguments: (a n : ℕ) [NeZero n]
Goal: ↑↑a = a % n
-- Fin.val_cast_of_lt
theorem val_cast_of_lt {n : ℕ} [NeZero n] {a : ℕ} (h : a < n) : (a : Fin n).val = a 
Arguments: {n : ℕ} [NeZero n] {a : ℕ} (h : a < n)
Goal: ↑↑a = a
-- Fin.cast_val_eq_self
@[simp] theorem cast_val_eq_self {n : ℕ} [NeZero n] (a : Fin n) : (a.val : Fin n) = a 
Arguments: {n : ℕ} [NeZero n] (a : Fin n)
Goal: ↑↑a = a
-- Fin.natCast_self
@[simp] lemma natCast_self (n : ℕ) [NeZero n] : (n : Fin n) = 0 
Arguments: (n : ℕ) [NeZero n]
Goal: ↑n = 0
-- Fin.natCast_eq_zero
@[simp] lemma natCast_eq_zero {a n : ℕ} [NeZero n] : (a : Fin n) = 0 ↔ n ∣ a 
Arguments: {a n : ℕ} [NeZero n]
Goal: ↑a = 0 ↔ n ∣ a
-- Fin.natCast_eq_last
@[simp]
theorem natCast_eq_last (n) : (n : Fin (n + 1)) = Fin.last n 
Arguments: (n : ℕ)
Goal: ↑n = Fin.last n
-- Fin.le_val_last
theorem le_val_last (i : Fin (n + 1)) : i ≤ n 
Arguments: {n : ℕ} (i : Fin (n + 1))
Goal: i ≤ ↑n
-- Fin.natCast_le_natCast
lemma natCast_le_natCast (han : a ≤ n) (hbn : b ≤ n) : (a : Fin (n + 1)) ≤ b ↔ a ≤ b 
Arguments: {n a b : ℕ} (han : a ≤ n) (hbn : b ≤ n)
Goal: ↑a ≤ ↑b ↔ a ≤ b
-- Fin.natCast_lt_natCast
lemma natCast_lt_natCast (han : a ≤ n) (hbn : b ≤ n) : (a : Fin (n + 1)) < b ↔ a < b 
Arguments: {n a b : ℕ} (han : a ≤ n) (hbn : b ≤ n)
Goal: ↑a < ↑b ↔ a < b
-- Fin.natCast_mono
lemma natCast_mono (hbn : b ≤ n) (hab : a ≤ b) : (a : Fin (n + 1)) ≤ b 
Arguments: {n a b : ℕ} (hbn : b ≤ n) (hab : a ≤ b)
Goal: ↑a ≤ ↑b
-- Fin.natCast_strictMono
lemma natCast_strictMono (hbn : b ≤ n) (hab : a < b) : (a : Fin (n + 1)) < b 
Arguments: {n a b : ℕ} (hbn : b ≤ n) (hab : a < b)
Goal: ↑a < ↑b
-- Fin.one_eq_zero_iff
@[simp]
theorem one_eq_zero_iff [NeZero n] : (1 : Fin n) = 0 ↔ n = 1 
Arguments: {n : ℕ} [NeZero n]
Goal: 1 = 0 ↔ n = 1
-- Fin.zero_eq_one_iff
@[simp]
theorem zero_eq_one_iff [NeZero n] : (0 : Fin n) = 1 ↔ n = 1 
Arguments: {n : ℕ} [NeZero n]
Goal: 0 = 1 ↔ n = 1
-- Fin.succ_injective
lemma succ_injective (n : ℕ) : Injective (@Fin.succ n) 
Arguments: (n : ℕ)
Goal: Function.Injective Fin.succ
-- Fin.val_succEmb
@[simp]
theorem val_succEmb : ⇑(succEmb n) = Fin.succ 
Arguments: {n : ℕ}
Goal: ⇑(Fin.succEmb n) = Fin.succ
-- Fin.exists_succ_eq
@[simp]
theorem exists_succ_eq {x : Fin (n + 1)} : (∃ y, Fin.succ y = x) ↔ x ≠ 0 
Arguments: {n : ℕ} {x : Fin (n + 1)}
Goal: (∃ y, y.succ = x) ↔ x ≠ 0
-- Fin.exists_succ_eq_of_ne_zero
theorem exists_succ_eq_of_ne_zero {x : Fin (n + 1)} (h : x ≠ 0) :
    ∃ y, Fin.succ y = x 
Arguments: {n : ℕ} {x : Fin (n + 1)} (h : x ≠ 0)
Goal: ∃ y, y.succ = x
-- Fin.succ_zero_eq_one'
@[simp]
theorem succ_zero_eq_one' [NeZero n] : Fin.succ (0 : Fin n) = 1 
Arguments: {n : ℕ} [NeZero n]
Goal: Fin.succ 0 = 1
-- Fin.one_pos'
theorem one_pos' [NeZero n] : (0 : Fin (n + 1)) < 1 
Arguments: {n : ℕ} [NeZero n]
Goal: 0 < 1
-- Fin.zero_ne_one'
theorem zero_ne_one' [NeZero n] : (0 : Fin (n + 1)) ≠ 1 
Arguments: {n : ℕ} [NeZero n]
Goal: 0 ≠ 1
-- Fin.succ_one_eq_two'
@[simp]
theorem succ_one_eq_two' [NeZero n] : Fin.succ (1 : Fin (n + 1)) = 2 
Arguments: {n : ℕ} [NeZero n]
Goal: Fin.succ 1 = 2
-- Fin.le_zero_iff'
@[simp]
theorem le_zero_iff' {n : ℕ} [NeZero n] {k : Fin n} : k ≤ 0 ↔ k = 0 
Arguments: {n : ℕ} [NeZero n] {k : Fin n}
Goal: k ≤ 0 ↔ k = 0
-- Fin.cast_refl
@[simp] theorem cast_refl {n : Nat} (h : n = n) :
    Fin.cast h = id 
Arguments: {n : ℕ} (h : n = n)
Goal: Fin.cast h = id
-- Fin.castLE_inj
@[simp] lemma castLE_inj {hmn : m ≤ n} {a b : Fin m} : castLE hmn a = castLE hmn b ↔ a = b 
Arguments: {n m : ℕ} {hmn : m ≤ n} {a b : Fin m}
Goal: Fin.castLE hmn a = Fin.castLE hmn b ↔ a = b
-- Fin.castAdd_inj
@[simp] lemma castAdd_inj {a b : Fin m} : castAdd n a = castAdd n b ↔ a = b 
Arguments: {n m : ℕ} {a b : Fin m}
Goal: Fin.castAdd n a = Fin.castAdd n b ↔ a = b
-- Fin.castLE_injective
lemma castLE_injective (hmn : m ≤ n) : Injective (castLE hmn) 
Arguments: {n m : ℕ} (hmn : m ≤ n)
Goal: Function.Injective (Fin.castLE hmn)
-- Fin.castAdd_injective
lemma castAdd_injective (m n : ℕ) : Injective (@Fin.castAdd m n) 
Arguments: (m n : ℕ)
Goal: Function.Injective (Fin.castAdd n)
-- Fin.castSucc_injective
lemma castSucc_injective (n : ℕ) : Injective (@Fin.castSucc n) 
Arguments: (n : ℕ)
Goal: Function.Injective Fin.castSucc
-- Fin.castLEEmb_apply
@[simps! apply]
def castLEEmb (h : n ≤ m) : Fin n ↪ Fin m 
Arguments: {n m : ℕ} (h : n ≤ m) (i : Fin n)
Goal: (Fin.castLEEmb h) i = Fin.castLE h i
-- Fin.coe_castLEEmb
@[simp, norm_cast] lemma coe_castLEEmb {m n} (hmn : m ≤ n) : castLEEmb hmn = castLE hmn 
Arguments: {m n : ℕ} (hmn : m ≤ n)
Goal: ⇑(Fin.castLEEmb hmn) = Fin.castLE hmn
-- Fin.nonempty_embedding_iff
lemma nonempty_embedding_iff : Nonempty (Fin n ↪ Fin m) ↔ n ≤ m 
Arguments: {n m : ℕ}
Goal: Nonempty (Fin n ↪ Fin m) ↔ n ≤ m
-- Fin.equiv_iff_eq
lemma equiv_iff_eq : Nonempty (Fin m ≃ Fin n) ↔ m = n 
Arguments: {n m : ℕ}
Goal: Nonempty (Fin m ≃ Fin n) ↔ m = n
-- Fin.castLE_castSucc
@[simp] lemma castLE_castSucc {n m} (i : Fin n) (h : n + 1 ≤ m) :
    i.castSucc.castLE h = i.castLE (Nat.le_of_succ_le h) 
Arguments: {n m : ℕ} (i : Fin n) (h : n + 1 ≤ m)
Goal: Fin.castLE h i.castSucc = Fin.castLE ⋯ i
-- Fin.castLE_comp_castSucc
@[simp] lemma castLE_comp_castSucc {n m} (h : n + 1 ≤ m) :
    Fin.castLE h ∘ Fin.castSucc = Fin.castLE (Nat.le_of_succ_le h) 
Arguments: {n m : ℕ} (h : n + 1 ≤ m)
Goal: Fin.castLE h ∘ Fin.castSucc = Fin.castLE ⋯
-- Fin.castLE_rfl
@[simp] lemma castLE_rfl (n : ℕ) : Fin.castLE (le_refl n) = id 
Arguments: (n : ℕ)
Goal: Fin.castLE ⋯ = id
-- Fin.range_castLE
@[simp]
theorem range_castLE {n k : ℕ} (h : n ≤ k) : Set.range (castLE h) = { i : Fin k | (i : ℕ) < n } 
Arguments: {n k : ℕ} (h : n ≤ k)
Goal: Set.range (Fin.castLE h) = {i | ↑i < n}
-- Fin.coe_of_injective_castLE_symm
@[simp]
theorem coe_of_injective_castLE_symm {n k : ℕ} (h : n ≤ k) (i : Fin k) (hi) :
    ((Equiv.ofInjective _ (castLE_injective h)).symm ⟨i, hi⟩ : ℕ) = i 
Arguments: {n k : ℕ} (h : n ≤ k) (i : Fin k) (hi : i ∈ Set.range (Fin.castLE h))
Goal: ↑((Equiv.ofInjective (Fin.castLE h) ⋯).symm ⟨i, hi⟩) = ↑i
-- Fin.leftInverse_cast
theorem leftInverse_cast (eq : n = m) : LeftInverse (cast eq.symm) (cast eq) 
Arguments: {n m : ℕ} (eq : n = m)
Goal: Function.LeftInverse (Fin.cast ⋯) (Fin.cast eq)
-- Fin.rightInverse_cast
theorem rightInverse_cast (eq : n = m) : RightInverse (cast eq.symm) (cast eq) 
Arguments: {n m : ℕ} (eq : n = m)
Goal: Function.RightInverse (Fin.cast ⋯) (Fin.cast eq)
-- Fin.cast_le_cast
theorem cast_le_cast (eq : n = m) {a b : Fin n} : cast eq a ≤ cast eq b ↔ a ≤ b 
Arguments: {n m : ℕ} (eq : n = m) {a b : Fin n}
Goal: Fin.cast eq a ≤ Fin.cast eq b ↔ a ≤ b
-- finCongr_symm_apply
@[simps]
def _root_.finCongr (eq : n = m) : Fin n ≃ Fin m 
Arguments: {n m : ℕ} (eq : n = m) (i : Fin m)
Goal: (finCongr eq).symm i = Fin.cast ⋯ i
-- finCongr_apply
@[simps]
def _root_.finCongr (eq : n = m) : Fin n ≃ Fin m 
Arguments: {n m : ℕ} (eq : n = m) (i : Fin n)
Goal: (finCongr eq) i = Fin.cast eq i