Built with doc-gen4, running Lean4. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓to navigate, Ctrl+πŸ–±οΈto focus. On Mac, use Cmdinstead of Ctrl.
/-
Copyright (c) 2014 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro

! This file was ported from Lean 3 source module data.nat.cast.basic
! leanprover-community/mathlib commit acebd8d49928f6ed8920e502a6c90674e75bd441
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.GroupWithZero.Commute
import Mathlib.Algebra.Hom.Ring
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Ring.Commute
import Mathlib.Data.Nat.Order.Basic
import Mathlib.Algebra.Group.Opposite

/-!
# Cast of natural numbers (additional theorems)

This file proves additional properties about the *canonical* homomorphism from
the natural numbers into an additive monoid with a one (`Nat.cast`).

## Main declarations

* `castAddMonoidHom`: `cast` bundled as an `AddMonoidHom`.
* `castRingHom`: `cast` bundled as a `RingHom`.
-/

-- Porting note: There are many occasions below where we need `simp [map_zero f]`
-- where `simp [map_zero]` should suffice. (Similarly for `map_one`.)
-- See https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/simp.20regression.20with.20MonoidHomClass

variable {
Ξ±: Type ?u.33331
Ξ±
Ξ²: Type ?u.11
Ξ²
:
Type _: Type (?u.6990+1)
Type _
} namespace Nat /-- `Nat.cast : β„• β†’ Ξ±` as an `AddMonoidHom`. -/ def
castAddMonoidHom: (Ξ± : Type u_1) β†’ [inst : AddMonoidWithOne Ξ±] β†’ β„• β†’+ Ξ±
castAddMonoidHom
(
Ξ±: Type ?u.14
Ξ±
:
Type _: Type (?u.14+1)
Type _
) [
AddMonoidWithOne: Type ?u.17 β†’ Type ?u.17
AddMonoidWithOne
Ξ±: Type ?u.14
Ξ±
] :
β„•: Type
β„•
β†’+
Ξ±: Type ?u.14
Ξ±
where toFun :=
Nat.cast: {R : Type ?u.566} β†’ [inst : NatCast R] β†’ β„• β†’ R
Nat.cast
map_add' :=
cast_add: βˆ€ {R : Type ?u.743} [inst : AddMonoidWithOne R] (m n : β„•), ↑(m + n) = ↑m + ↑n
cast_add
map_zero' :=
cast_zero: βˆ€ {R : Type ?u.725} [inst : AddMonoidWithOne R], ↑0 = 0
cast_zero
#align nat.cast_add_monoid_hom
Nat.castAddMonoidHom: (Ξ± : Type u_1) β†’ [inst : AddMonoidWithOne Ξ±] β†’ β„• β†’+ Ξ±
Nat.castAddMonoidHom
@[simp] theorem
coe_castAddMonoidHom: βˆ€ {Ξ± : Type u_1} [inst : AddMonoidWithOne Ξ±], ↑(castAddMonoidHom Ξ±) = Nat.cast
coe_castAddMonoidHom
[
AddMonoidWithOne: Type ?u.824 β†’ Type ?u.824
AddMonoidWithOne
Ξ±: Type ?u.818
Ξ±
] : (
castAddMonoidHom: (Ξ± : Type ?u.831) β†’ [inst : AddMonoidWithOne Ξ±] β†’ β„• β†’+ Ξ±
castAddMonoidHom
Ξ±: Type ?u.818
Ξ±
:
β„•: Type
β„•
β†’
Ξ±: Type ?u.818
Ξ±
) =
Nat.cast: {R : Type ?u.1820} β†’ [inst : NatCast R] β†’ β„• β†’ R
Nat.cast
:=
rfl: βˆ€ {Ξ± : Sort ?u.2066} {a : Ξ±}, a = a
rfl
#align nat.coe_cast_add_monoid_hom
Nat.coe_castAddMonoidHom: βˆ€ {Ξ± : Type u_1} [inst : AddMonoidWithOne Ξ±], ↑(castAddMonoidHom Ξ±) = Nat.cast
Nat.coe_castAddMonoidHom
@[simp, norm_cast] theorem
cast_mul: βˆ€ [inst : NonAssocSemiring Ξ±] (m n : β„•), ↑(m * n) = ↑m * ↑n
cast_mul
[
NonAssocSemiring: Type ?u.2103 β†’ Type ?u.2103
NonAssocSemiring
Ξ±: Type ?u.2097
Ξ±
] (m n :
β„•: Type
β„•
) : ((m * n :
β„•: Type
β„•
) :
Ξ±: Type ?u.2097
Ξ±
) = m * n :=

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.2100

inst✝: NonAssocSemiring α

m, n: β„•


↑(m * n) = ↑m * ↑n
Ξ±: Type u_1

Ξ²: Type ?u.2100

inst✝: NonAssocSemiring α

m: β„•


zero
↑(m * zero) = ↑m * ↑zero
Ξ±: Type u_1

Ξ²: Type ?u.2100

inst✝: NonAssocSemiring α

m, n✝: β„•

n_ih✝: ↑(m * n✝) = ↑m * ↑n✝


succ
↑(m * succ n✝) = ↑m * ↑(succ n✝)
Ξ±: Type u_1

Ξ²: Type ?u.2100

inst✝: NonAssocSemiring α

m, n: β„•


↑(m * n) = ↑m * ↑n
Ξ±: Type u_1

Ξ²: Type ?u.2100

inst✝: NonAssocSemiring α

m: β„•


zero
↑(m * zero) = ↑m * ↑zero
Ξ±: Type u_1

Ξ²: Type ?u.2100

inst✝: NonAssocSemiring α

m, n✝: β„•

n_ih✝: ↑(m * n✝) = ↑m * ↑n✝


succ
↑(m * succ n✝) = ↑m * ↑(succ n✝)
Ξ±: Type u_1

Ξ²: Type ?u.2100

inst✝: NonAssocSemiring α

m, n: β„•


↑(m * n) = ↑m * ↑n

Goals accomplished! πŸ™
#align nat.cast_mul
Nat.cast_mul: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±] (m n : β„•), ↑(m * n) = ↑m * ↑n
Nat.cast_mul
/-- `Nat.cast : β„• β†’ Ξ±` as a `RingHom` -/ def
castRingHom: (Ξ± : Type u_1) β†’ [inst : NonAssocSemiring Ξ±] β†’ β„• β†’+* Ξ±
castRingHom
(
Ξ±: Type ?u.4477
Ξ±
:
Type _: Type (?u.4477+1)
Type _
) [
NonAssocSemiring: Type ?u.4480 β†’ Type ?u.4480
NonAssocSemiring
Ξ±: Type ?u.4477
Ξ±
] :
β„•: Type
β„•
β†’+*
Ξ±: Type ?u.4477
Ξ±
:= {
castAddMonoidHom: (Ξ± : Type ?u.4511) β†’ [inst : AddMonoidWithOne Ξ±] β†’ β„• β†’+ Ξ±
castAddMonoidHom
Ξ±: Type ?u.4477
Ξ±
with toFun :=
Nat.cast: {R : Type ?u.4854} β†’ [inst : NatCast R] β†’ β„• β†’ R
Nat.cast
, map_one' :=
cast_one: βˆ€ {R : Type ?u.4997} [inst : AddMonoidWithOne R], ↑1 = 1
cast_one
, map_mul' :=
cast_mul: βˆ€ {Ξ± : Type ?u.5014} [inst : NonAssocSemiring Ξ±] (m n : β„•), ↑(m * n) = ↑m * ↑n
cast_mul
} #align nat.cast_ring_hom
Nat.castRingHom: (Ξ± : Type u_1) β†’ [inst : NonAssocSemiring Ξ±] β†’ β„• β†’+* Ξ±
Nat.castRingHom
@[simp] theorem
coe_castRingHom: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±], ↑(castRingHom Ξ±) = Nat.cast
coe_castRingHom
[
NonAssocSemiring: Type ?u.5452 β†’ Type ?u.5452
NonAssocSemiring
Ξ±: Type ?u.5446
Ξ±
] : (
castRingHom: (Ξ± : Type ?u.5459) β†’ [inst : NonAssocSemiring Ξ±] β†’ β„• β†’+* Ξ±
castRingHom
Ξ±: Type ?u.5446
Ξ±
:
β„•: Type
β„•
β†’
Ξ±: Type ?u.5446
Ξ±
) =
Nat.cast: {R : Type ?u.5996} β†’ [inst : NatCast R] β†’ β„• β†’ R
Nat.cast
:=
rfl: βˆ€ {Ξ± : Sort ?u.6222} {a : Ξ±}, a = a
rfl
#align nat.coe_cast_ring_hom
Nat.coe_castRingHom: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±], ↑(castRingHom Ξ±) = Nat.cast
Nat.coe_castRingHom
theorem
cast_commute: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±] (n : β„•) (x : Ξ±), Commute (↑n) x
cast_commute
[
NonAssocSemiring: Type ?u.6259 β†’ Type ?u.6259
NonAssocSemiring
Ξ±: Type ?u.6253
Ξ±
] (n :
β„•: Type
β„•
) (
x: Ξ±
x
:
Ξ±: Type ?u.6253
Ξ±
) :
Commute: {S : Type ?u.6266} β†’ [inst : Mul S] β†’ S β†’ S β†’ Prop
Commute
(n :
Ξ±: Type ?u.6253
Ξ±
)
x: Ξ±
x
:=

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

n: β„•

x: Ξ±


Commute (↑n) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

n: β„•

x: Ξ±


Commute (↑n) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±


zero
Commute (↑zero) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±


zero
Commute (↑zero) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±


zero
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±


zero
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±


zero
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±


zero
Commute (↑zero) x

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

n: β„•

x: Ξ±


Commute (↑n) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±

n: β„•

ihn: Commute (↑n) x


succ
Commute (↑(succ n)) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±

n: β„•

ihn: Commute (↑n) x


succ
Commute (↑(succ n)) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±

n: β„•

ihn: Commute (↑n) x


succ
Commute (↑n + 1) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±

n: β„•

ihn: Commute (↑n) x


succ
Commute (↑n + 1) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±

n: β„•

ihn: Commute (↑n) x


succ
Commute (↑n + 1) x
Ξ±: Type u_1

Ξ²: Type ?u.6256

inst✝: NonAssocSemiring α

x: Ξ±

n: β„•

ihn: Commute (↑n) x


succ
Commute (↑(succ n)) x

Goals accomplished! πŸ™
#align nat.cast_commute
Nat.cast_commute: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±] (n : β„•) (x : Ξ±), Commute (↑n) x
Nat.cast_commute
theorem
cast_comm: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±] (n : β„•) (x : Ξ±), ↑n * x = x * ↑n
cast_comm
[
NonAssocSemiring: Type ?u.6996 β†’ Type ?u.6996
NonAssocSemiring
Ξ±: Type ?u.6990
Ξ±
] (n :
β„•: Type
β„•
) (
x: Ξ±
x
:
Ξ±: Type ?u.6990
Ξ±
) : (n :
Ξ±: Type ?u.6990
Ξ±
) *
x: Ξ±
x
=
x: Ξ±
x
* n := (
cast_commute: βˆ€ {Ξ± : Type ?u.7644} [inst : NonAssocSemiring Ξ±] (n : β„•) (x : Ξ±), Commute (↑n) x
cast_commute
n
x: Ξ±
x
).
eq: βˆ€ {S : Type ?u.7651} [inst : Mul S] {a b : S}, Commute a b β†’ a * b = b * a
eq
#align nat.cast_comm
Nat.cast_comm: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±] (n : β„•) (x : Ξ±), ↑n * x = x * ↑n
Nat.cast_comm
theorem
commute_cast: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±] (x : Ξ±) (n : β„•), Commute x ↑n
commute_cast
[
NonAssocSemiring: Type ?u.7783 β†’ Type ?u.7783
NonAssocSemiring
Ξ±: Type ?u.7777
Ξ±
] (
x: Ξ±
x
:
Ξ±: Type ?u.7777
Ξ±
) (n :
β„•: Type
β„•
) :
Commute: {S : Type ?u.7790} β†’ [inst : Mul S] β†’ S β†’ S β†’ Prop
Commute
x: Ξ±
x
n := (n.
cast_commute: βˆ€ {Ξ± : Type ?u.8103} [inst : NonAssocSemiring Ξ±] (n : β„•) (x : Ξ±), Commute (↑n) x
cast_commute
x: Ξ±
x
).
symm: βˆ€ {S : Type ?u.8114} [inst : Mul S] {a b : S}, Commute a b β†’ Commute b a
symm
#align nat.commute_cast
Nat.commute_cast: βˆ€ {Ξ± : Type u_1} [inst : NonAssocSemiring Ξ±] (x : Ξ±) (n : β„•), Commute x ↑n
Nat.commute_cast
section OrderedSemiring variable [
OrderedSemiring: Type ?u.13765 β†’ Type ?u.13765
OrderedSemiring
Ξ±: Type ?u.13759
Ξ±
] @[mono] theorem
mono_cast: Monotone Nat.cast
mono_cast
:
Monotone: {Ξ± : Type ?u.8256} β†’ {Ξ² : Type ?u.8255} β†’ [inst : Preorder Ξ±] β†’ [inst : Preorder Ξ²] β†’ (Ξ± β†’ Ξ²) β†’ Prop
Monotone
(
Nat.cast: {R : Type ?u.8296} β†’ [inst : NatCast R] β†’ β„• β†’ R
Nat.cast
:
β„•: Type
β„•
β†’
Ξ±: Type ?u.8246
Ξ±
) :=
monotone_nat_of_le_succ: βˆ€ {Ξ± : Type ?u.8523} [inst : Preorder Ξ±] {f : β„• β†’ Ξ±}, (βˆ€ (n : β„•), f n ≀ f (n + 1)) β†’ Monotone f
monotone_nat_of_le_succ
fun
n: ?m.8577
n
↦

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.8249

inst✝: OrderedSemiring α

n: β„•


↑n ≀ ↑(n + 1)
Ξ±: Type u_1

Ξ²: Type ?u.8249

inst✝: OrderedSemiring α

n: β„•


↑n ≀ ↑(n + 1)
Ξ±: Type u_1

Ξ²: Type ?u.8249

inst✝: OrderedSemiring α

n: β„•


↑n ≀ ↑n + 1
Ξ±: Type u_1

Ξ²: Type ?u.8249

inst✝: OrderedSemiring α

n: β„•


↑n ≀ ↑n + 1
Ξ±: Type u_1

Ξ²: Type ?u.8249

inst✝: OrderedSemiring α

n: β„•


↑n ≀ ↑n + 1
Ξ±: Type u_1

Ξ²: Type ?u.8249

inst✝: OrderedSemiring α

n: β„•


↑n ≀ ↑(n + 1)

Goals accomplished! πŸ™
#align nat.mono_cast
Nat.mono_cast: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±], Monotone Nat.cast
Nat.mono_cast
@[simp] theorem
cast_nonneg: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] (n : β„•), 0 ≀ ↑n
cast_nonneg
(n :
β„•: Type
β„•
) :
0: ?m.9719
0
≀ (n :
Ξ±: Type ?u.9706
Ξ±
) := @
Nat.cast_zero: βˆ€ {R : Type ?u.10082} [inst : AddMonoidWithOne R], ↑0 = 0
Nat.cast_zero
Ξ±: Type ?u.9706
Ξ±
_ β–Έ
mono_cast: βˆ€ {Ξ± : Type ?u.10225} [inst : OrderedSemiring Ξ±], Monotone Nat.cast
mono_cast
(
Nat.zero_le: βˆ€ (n : β„•), 0 ≀ n
Nat.zero_le
n) #align nat.cast_nonneg
Nat.cast_nonneg: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] (n : β„•), 0 ≀ ↑n
Nat.cast_nonneg
section Nontrivial variable [
Nontrivial: Type ?u.10295 β†’ Prop
Nontrivial
Ξ±: Type ?u.10286
Ξ±
] theorem
cast_add_one_pos: βˆ€ (n : β„•), 0 < ↑n + 1
cast_add_one_pos
(n :
β„•: Type
β„•
) :
0: ?m.10314
0
< (n :
Ξ±: Type ?u.10298
Ξ±
) +
1: ?m.10445
1
:=
zero_lt_one: βˆ€ {Ξ± : Type ?u.11032} [inst : Zero Ξ±] [inst_1 : One Ξ±] [inst_2 : PartialOrder Ξ±] [inst_3 : ZeroLEOneClass Ξ±] [inst_4 : NeZero 1], 0 < 1
zero_lt_one
.
trans_le: βˆ€ {Ξ± : Type ?u.11342} [inst : Preorder Ξ±] {a b c : Ξ±}, a < b β†’ b ≀ c β†’ a < c
trans_le
<|
le_add_of_nonneg_left: βˆ€ {Ξ± : Type ?u.11522} [inst : AddZeroClass Ξ±] [inst_1 : LE Ξ±] [inst_2 : CovariantClass Ξ± Ξ± (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1] {a b : Ξ±}, 0 ≀ b β†’ a ≀ b + a
le_add_of_nonneg_left
n.
cast_nonneg: βˆ€ {Ξ± : Type ?u.11728} [inst : OrderedSemiring Ξ±] (n : β„•), 0 ≀ ↑n
cast_nonneg
#align nat.cast_add_one_pos
Nat.cast_add_one_pos: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : Nontrivial Ξ±] (n : β„•), 0 < ↑n + 1
Nat.cast_add_one_pos
@[simp] theorem
cast_pos: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : Nontrivial Ξ±] {n : β„•}, 0 < ↑n ↔ 0 < n
cast_pos
{n :
β„•: Type
β„•
} : (
0: ?m.12335
0
:
Ξ±: Type ?u.12318
Ξ±
) < n ↔
0: ?m.12762
0
< n :=

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.12321

inst✝¹: OrderedSemiring α

inst✝: Nontrivial α

n: β„•


0 < ↑n ↔ 0 < n
Ξ±: Type u_1

Ξ²: Type ?u.12321

inst✝¹: OrderedSemiring α

inst✝: Nontrivial α


zero
0 < ↑zero ↔ 0 < zero
Ξ±: Type u_1

Ξ²: Type ?u.12321

inst✝¹: OrderedSemiring α

inst✝: Nontrivial α

n✝: β„•


succ
0 < ↑(succ n✝) ↔ 0 < succ n✝
Ξ±: Type u_1

Ξ²: Type ?u.12321

inst✝¹: OrderedSemiring α

inst✝: Nontrivial α

n: β„•


0 < ↑n ↔ 0 < n
Ξ±: Type u_1

Ξ²: Type ?u.12321

inst✝¹: OrderedSemiring α

inst✝: Nontrivial α


zero
0 < ↑zero ↔ 0 < zero
Ξ±: Type u_1

Ξ²: Type ?u.12321

inst✝¹: OrderedSemiring α

inst✝: Nontrivial α

n✝: β„•


succ
0 < ↑(succ n✝) ↔ 0 < succ n✝
Ξ±: Type u_1

Ξ²: Type ?u.12321

inst✝¹: OrderedSemiring α

inst✝: Nontrivial α

n: β„•


0 < ↑n ↔ 0 < n

Goals accomplished! πŸ™
#align nat.cast_pos
Nat.cast_pos: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : Nontrivial Ξ±] {n : β„•}, 0 < ↑n ↔ 0 < n
Nat.cast_pos
end Nontrivial variable [
CharZero: (R : Type ?u.15455) β†’ [inst : AddMonoidWithOne R] β†’ Prop
CharZero
Ξ±: Type ?u.13759
Ξ±
] {m n :
β„•: Type
β„•
} theorem
strictMono_cast: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±], StrictMono Nat.cast
strictMono_cast
:
StrictMono: {Ξ± : Type ?u.14076} β†’ {Ξ² : Type ?u.14075} β†’ [inst : Preorder Ξ±] β†’ [inst : Preorder Ξ²] β†’ (Ξ± β†’ Ξ²) β†’ Prop
StrictMono
(
Nat.cast: {R : Type ?u.14116} β†’ [inst : NatCast R] β†’ β„• β†’ R
Nat.cast
:
β„•: Type
β„•
β†’
Ξ±: Type ?u.13917
Ξ±
) :=
mono_cast: βˆ€ {Ξ± : Type ?u.14343} [inst : OrderedSemiring Ξ±], Monotone Nat.cast
mono_cast
.
strictMono_of_injective: βˆ€ {Ξ± : Type ?u.14352} {Ξ² : Type ?u.14351} [inst : Preorder Ξ±] [inst_1 : PartialOrder Ξ²] {f : Ξ± β†’ Ξ²}, Monotone f β†’ Function.Injective f β†’ StrictMono f
strictMono_of_injective
cast_injective: βˆ€ {R : Type ?u.14458} [inst : AddMonoidWithOne R] [inst_1 : CharZero R], Function.Injective Nat.cast
cast_injective
#align nat.strict_mono_cast
Nat.strictMono_cast: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±], StrictMono Nat.cast
Nat.strictMono_cast
/-- `Nat.cast : β„• β†’ Ξ±` as an `OrderEmbedding` -/ @[simps! (config := { fullyApplied :=
false: Bool
false
})] def
castOrderEmbedding: β„• β†ͺo Ξ±
castOrderEmbedding
:
β„•: Type
β„•
β†ͺo
Ξ±: Type ?u.14695
Ξ±
:=
OrderEmbedding.ofStrictMono: {Ξ± : Type ?u.14965} β†’ {Ξ² : Type ?u.14964} β†’ [inst : LinearOrder Ξ±] β†’ [inst_1 : Preorder Ξ²] β†’ (f : Ξ± β†’ Ξ²) β†’ StrictMono f β†’ Ξ± β†ͺo Ξ²
OrderEmbedding.ofStrictMono
Nat.cast: {R : Type ?u.15095} β†’ [inst : NatCast R] β†’ β„• β†’ R
Nat.cast
Nat.strictMono_cast: βˆ€ {Ξ± : Type ?u.15174} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±], StrictMono Nat.cast
Nat.strictMono_cast
#align nat.cast_order_embedding
Nat.castOrderEmbedding: {Ξ± : Type u_1} β†’ [inst : OrderedSemiring Ξ±] β†’ [inst_1 : CharZero Ξ±] β†’ β„• β†ͺo Ξ±
Nat.castOrderEmbedding
#align nat.cast_order_embedding_apply
Nat.castOrderEmbedding_apply: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±], ↑castOrderEmbedding = Nat.cast
Nat.castOrderEmbedding_apply
@[simp, norm_cast] theorem
cast_le: ↑m ≀ ↑n ↔ m ≀ n
cast_le
: (m :
Ξ±: Type ?u.15446
Ξ±
) ≀ n ↔ m ≀ n :=
strictMono_cast: βˆ€ {Ξ± : Type ?u.15979} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±], StrictMono Nat.cast
strictMono_cast
.
le_iff_le: βˆ€ {Ξ± : Type ?u.15992} {Ξ² : Type ?u.15991} [inst : LinearOrder Ξ±] [inst_1 : Preorder Ξ²] {f : Ξ± β†’ Ξ²}, StrictMono f β†’ βˆ€ {a b : Ξ±}, f a ≀ f b ↔ a ≀ b
le_iff_le
#align nat.cast_le
Nat.cast_le: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±] {m n : β„•}, ↑m ≀ ↑n ↔ m ≀ n
Nat.cast_le
@[simp, norm_cast, mono] theorem
cast_lt: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±] {m n : β„•}, ↑m < ↑n ↔ m < n
cast_lt
: (m :
Ξ±: Type ?u.16299
Ξ±
) < n ↔ m < n :=
strictMono_cast: βˆ€ {Ξ± : Type ?u.16832} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±], StrictMono Nat.cast
strictMono_cast
.
lt_iff_lt: βˆ€ {Ξ± : Type ?u.16845} {Ξ² : Type ?u.16844} [inst : LinearOrder Ξ±] [inst_1 : Preorder Ξ²] {f : Ξ± β†’ Ξ²}, StrictMono f β†’ βˆ€ {a b : Ξ±}, f a < f b ↔ a < b
lt_iff_lt
#align nat.cast_lt
Nat.cast_lt: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±] {m n : β„•}, ↑m < ↑n ↔ m < n
Nat.cast_lt
@[simp, norm_cast] theorem
one_lt_cast: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±] {n : β„•}, 1 < ↑n ↔ 1 < n
one_lt_cast
:
1: ?m.17312
1
< (n :
Ξ±: Type ?u.17152
Ξ±
) ↔
1: ?m.17609
1
< n :=

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.17155

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


1 < ↑n ↔ 1 < n
Ξ±: Type u_1

Ξ²: Type ?u.17155

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


1 < ↑n ↔ 1 < n
Ξ±: Type u_1

Ξ²: Type ?u.17155

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑1 < ↑n ↔ 1 < n
Ξ±: Type u_1

Ξ²: Type ?u.17155

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


1 < ↑n ↔ 1 < n
Ξ±: Type u_1

Ξ²: Type ?u.17155

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


1 < n ↔ 1 < n

Goals accomplished! πŸ™
#align nat.one_lt_cast
Nat.one_lt_cast: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±] {n : β„•}, 1 < ↑n ↔ 1 < n
Nat.one_lt_cast
@[simp, norm_cast] theorem
one_le_cast: 1 ≀ ↑n ↔ 1 ≀ n
one_le_cast
:
1: ?m.18162
1
≀ (n :
Ξ±: Type ?u.18002
Ξ±
) ↔
1: ?m.18459
1
≀ n :=

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.18005

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


1 ≀ ↑n ↔ 1 ≀ n
Ξ±: Type u_1

Ξ²: Type ?u.18005

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


1 ≀ ↑n ↔ 1 ≀ n
Ξ±: Type u_1

Ξ²: Type ?u.18005

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑1 ≀ ↑n ↔ 1 ≀ n
Ξ±: Type u_1

Ξ²: Type ?u.18005

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


1 ≀ ↑n ↔ 1 ≀ n
Ξ±: Type u_1

Ξ²: Type ?u.18005

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•



Goals accomplished! πŸ™
#align nat.one_le_cast
Nat.one_le_cast: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±] {n : β„•}, 1 ≀ ↑n ↔ 1 ≀ n
Nat.one_le_cast
@[simp, norm_cast] theorem
cast_lt_one: ↑n < 1 ↔ n = 0
cast_lt_one
: (n :
Ξ±: Type ?u.18852
Ξ±
) <
1: ?m.19124
1
↔ n =
0: ?m.19304
0
:=

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n < 1 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n < 1 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n < ↑1 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n < 1 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


n < 1 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n < 1 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


n ≀ 0 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n < 1 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n < 1 ↔ n = 0
Ξ±: Type u_1

Ξ²: Type ?u.18855

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•



Goals accomplished! πŸ™
#align nat.cast_lt_one
Nat.cast_lt_one: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±] {n : β„•}, ↑n < 1 ↔ n = 0
Nat.cast_lt_one
@[simp, norm_cast] theorem
cast_le_one: ↑n ≀ 1 ↔ n ≀ 1
cast_le_one
: (n :
Ξ±: Type ?u.19890
Ξ±
) ≀
1: ?m.20162
1
↔ n ≀
1: ?m.20342
1
:=

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.19893

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n ≀ 1 ↔ n ≀ 1
Ξ±: Type u_1

Ξ²: Type ?u.19893

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n ≀ 1 ↔ n ≀ 1
Ξ±: Type u_1

Ξ²: Type ?u.19893

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n ≀ ↑1 ↔ n ≀ 1
Ξ±: Type u_1

Ξ²: Type ?u.19893

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•


↑n ≀ 1 ↔ n ≀ 1
Ξ±: Type u_1

Ξ²: Type ?u.19893

inst✝¹: OrderedSemiring α

inst✝: CharZero α

m, n: β„•



Goals accomplished! πŸ™
#align nat.cast_le_one
Nat.cast_le_one: βˆ€ {Ξ± : Type u_1} [inst : OrderedSemiring Ξ±] [inst_1 : CharZero Ξ±] {n : β„•}, ↑n ≀ 1 ↔ n ≀ 1
Nat.cast_le_one
end OrderedSemiring /-- A version of `Nat.cast_sub` that works for `ℝβ‰₯0` and `β„šβ‰₯0`. Note that this proof doesn't work for `β„•βˆž` and `ℝβ‰₯0∞`, so we use type-specific lemmas for these types. -/ @[simp, norm_cast] theorem
cast_tsub: βˆ€ {Ξ± : Type u_1} [inst : CanonicallyOrderedCommSemiring Ξ±] [inst_1 : Sub Ξ±] [inst_2 : OrderedSub Ξ±] [inst_3 : ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1] (m n : β„•), ↑(m - n) = ↑m - ↑n
cast_tsub
[
CanonicallyOrderedCommSemiring: Type ?u.20733 β†’ Type ?u.20733
CanonicallyOrderedCommSemiring
Ξ±: Type ?u.20727
Ξ±
] [
Sub: Type ?u.20736 β†’ Type ?u.20736
Sub
Ξ±: Type ?u.20727
Ξ±
] [
OrderedSub: (Ξ± : Type ?u.20739) β†’ [inst : LE Ξ±] β†’ [inst : Add Ξ±] β†’ [inst : Sub Ξ±] β†’ Prop
OrderedSub
Ξ±: Type ?u.20727
Ξ±
] [
ContravariantClass: (M : Type ?u.21006) β†’ (N : Type ?u.21005) β†’ (M β†’ N β†’ N) β†’ (N β†’ N β†’ Prop) β†’ Prop
ContravariantClass
Ξ±: Type ?u.20727
Ξ±
Ξ±: Type ?u.20727
Ξ±
(Β· + Β·): Ξ± β†’ Ξ± β†’ Ξ±
(Β· + Β·)
(Β· ≀ Β·): Ξ± β†’ Ξ± β†’ Prop
(Β· ≀ Β·)
] (m n :
β„•: Type
β„•
) : ↑(m - n) = (m - n :
Ξ±: Type ?u.20727
Ξ±
) :=

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•


↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: n ≀ m


inr
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•


↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: n ≀ m


inr
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑0 = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
0 = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
0 = 0
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑m ≀ ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑m ≀ ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: m ≀ n


inl
↑(m - n) = ↑m - ↑n

Goals accomplished! πŸ™
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•


↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: n ≀ m


inr
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: n ≀ m


inr
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

n, m: β„•

h: n ≀ m + n


inr.intro
↑(m + n - n) = ↑(m + n) - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

m, n: β„•

h: n ≀ m


inr
↑(m - n) = ↑m - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

n, m: β„•

h: n ≀ m + n


inr.intro
↑(m + n - n) = ↑(m + n) - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

n, m: β„•

h: n ≀ m + n


inr.intro
↑m = ↑(m + n) - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

n, m: β„•

h: n ≀ m + n


inr.intro
↑(m + n - n) = ↑(m + n) - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

n, m: β„•

h: n ≀ m + n


inr.intro
↑m = ↑m + ↑n - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

n, m: β„•

h: n ≀ m + n


inr.intro
↑(m + n - n) = ↑(m + n) - ↑n
Ξ±: Type u_1

Ξ²: Type ?u.20730

inst✝³: CanonicallyOrderedCommSemiring α

inst✝²: Sub α

inst✝¹: OrderedSub α

inst✝: ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1

n, m: β„•

h: n ≀ m + n


inr.intro
↑m = ↑m

Goals accomplished! πŸ™
#align nat.cast_tsub
Nat.cast_tsub: βˆ€ {Ξ± : Type u_1} [inst : CanonicallyOrderedCommSemiring Ξ±] [inst_1 : Sub Ξ±] [inst_2 : OrderedSub Ξ±] [inst_3 : ContravariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1] (m n : β„•), ↑(m - n) = ↑m - ↑n
Nat.cast_tsub
@[simp, norm_cast] theorem
cast_min: βˆ€ [inst : LinearOrderedSemiring Ξ±] {a b : β„•}, ↑(min a b) = min ↑a ↑b
cast_min
[
LinearOrderedSemiring: Type ?u.23104 β†’ Type ?u.23104
LinearOrderedSemiring
Ξ±: Type ?u.23098
Ξ±
] {a b :
β„•: Type
β„•
} : ((
min: {Ξ± : Type ?u.23114} β†’ [self : Min Ξ±] β†’ Ξ± β†’ Ξ± β†’ Ξ±
min
a b :
β„•: Type
β„•
) :
Ξ±: Type ?u.23098
Ξ±
) =
min: {Ξ± : Type ?u.23206} β†’ [self : Min Ξ±] β†’ Ξ± β†’ Ξ± β†’ Ξ±
min
(a :
Ξ±: Type ?u.23098
Ξ±
) b := (@
mono_cast: βˆ€ {Ξ± : Type ?u.23344} [inst : OrderedSemiring Ξ±], Monotone Nat.cast
mono_cast
Ξ±: Type ?u.23098
Ξ±
_).
map_min: βˆ€ {Ξ± : Type ?u.23402} {Ξ² : Type ?u.23401} [inst : LinearOrder Ξ±] [inst_1 : LinearOrder Ξ²] {f : Ξ± β†’ Ξ²} {a b : Ξ±}, Monotone f β†’ f (min a b) = min (f a) (f b)
map_min
#align nat.cast_min
Nat.cast_min: βˆ€ {Ξ± : Type u_1} [inst : LinearOrderedSemiring Ξ±] {a b : β„•}, ↑(min a b) = min ↑a ↑b
Nat.cast_min
@[simp, norm_cast] theorem
cast_max: βˆ€ {Ξ± : Type u_1} [inst : LinearOrderedSemiring Ξ±] {a b : β„•}, ↑(max a b) = max ↑a ↑b
cast_max
[
LinearOrderedSemiring: Type ?u.23628 β†’ Type ?u.23628
LinearOrderedSemiring
Ξ±: Type ?u.23622
Ξ±
] {a b :
β„•: Type
β„•
} : ((
max: {Ξ± : Type ?u.23638} β†’ [self : Max Ξ±] β†’ Ξ± β†’ Ξ± β†’ Ξ±
max
a b :
β„•: Type
β„•
) :
Ξ±: Type ?u.23622
Ξ±
) =
max: {Ξ± : Type ?u.23730} β†’ [self : Max Ξ±] β†’ Ξ± β†’ Ξ± β†’ Ξ±
max
(a :
Ξ±: Type ?u.23622
Ξ±
) b := (@
mono_cast: βˆ€ {Ξ± : Type ?u.23868} [inst : OrderedSemiring Ξ±], Monotone Nat.cast
mono_cast
Ξ±: Type ?u.23622
Ξ±
_).
map_max: βˆ€ {Ξ± : Type ?u.23926} {Ξ² : Type ?u.23925} [inst : LinearOrder Ξ±] [inst_1 : LinearOrder Ξ²] {f : Ξ± β†’ Ξ²} {a b : Ξ±}, Monotone f β†’ f (max a b) = max (f a) (f b)
map_max
#align nat.cast_max
Nat.cast_max: βˆ€ {Ξ± : Type u_1} [inst : LinearOrderedSemiring Ξ±] {a b : β„•}, ↑(max a b) = max ↑a ↑b
Nat.cast_max
@[simp, norm_cast] theorem
abs_cast: βˆ€ [inst : LinearOrderedRing Ξ±] (a : β„•), abs ↑a = ↑a
abs_cast
[
LinearOrderedRing: Type ?u.24152 β†’ Type ?u.24152
LinearOrderedRing
Ξ±: Type ?u.24146
Ξ±
] (a :
β„•: Type
β„•
) : |(a :
Ξ±: Type ?u.24146
Ξ±
)| = a :=
abs_of_nonneg: βˆ€ {Ξ± : Type ?u.24423} [inst : AddGroup Ξ±] [inst_1 : LinearOrder Ξ±] [inst_2 : CovariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1] {a : Ξ±}, 0 ≀ a β†’ abs a = a
abs_of_nonneg
(
cast_nonneg: βˆ€ {Ξ± : Type ?u.24616} [inst : OrderedSemiring Ξ±] (n : β„•), 0 ≀ ↑n
cast_nonneg
a) #align nat.abs_cast
Nat.abs_cast: βˆ€ {Ξ± : Type u_1} [inst : LinearOrderedRing Ξ±] (a : β„•), abs ↑a = ↑a
Nat.abs_cast
theorem
coe_nat_dvd: βˆ€ [inst : Semiring Ξ±] {m n : β„•}, m ∣ n β†’ ↑m ∣ ↑n
coe_nat_dvd
[
Semiring: Type ?u.24846 β†’ Type ?u.24846
Semiring
Ξ±: Type ?u.24840
Ξ±
] {m n :
β„•: Type
β„•
} (
h: m ∣ n
h
: m ∣ n) : (m :
Ξ±: Type ?u.24840
Ξ±
) ∣ (n :
Ξ±: Type ?u.24840
Ξ±
) :=
map_dvd: βˆ€ {M : Type ?u.25078} {N : Type ?u.25079} [inst : Monoid M] [inst_1 : Monoid N] {F : Type ?u.25077} [inst_2 : MulHomClass F M N] (f : F) {a b : M}, a ∣ b β†’ ↑f a ∣ ↑f b
map_dvd
(
Nat.castRingHom: (Ξ± : Type ?u.25086) β†’ [inst : NonAssocSemiring Ξ±] β†’ β„• β†’+* Ξ±
Nat.castRingHom
Ξ±: Type ?u.24840
Ξ±
)
h: m ∣ n
h
#align nat.coe_nat_dvd
Nat.coe_nat_dvd: βˆ€ {Ξ± : Type u_1} [inst : Semiring Ξ±] {m n : β„•}, m ∣ n β†’ ↑m ∣ ↑n
Nat.coe_nat_dvd
alias
coe_nat_dvd: βˆ€ {Ξ± : Type u_1} [inst : Semiring Ξ±] {m n : β„•}, m ∣ n β†’ ↑m ∣ ↑n
coe_nat_dvd
←
_root_.Dvd.dvd.natCast: βˆ€ {Ξ± : Type u_1} [inst : Semiring Ξ±] {m n : β„•}, m ∣ n β†’ ↑m ∣ ↑n
_root_.Dvd.dvd.natCast
end Nat
instance: βˆ€ {Ξ± : Type u_1} [inst : AddMonoidWithOne Ξ±] [inst : CharZero Ξ±], Nontrivial Ξ±
instance
[
AddMonoidWithOne: Type ?u.25690 β†’ Type ?u.25690
AddMonoidWithOne
Ξ±: Type ?u.25684
Ξ±
] [
CharZero: (R : Type ?u.25693) β†’ [inst : AddMonoidWithOne R] β†’ Prop
CharZero
Ξ±: Type ?u.25684
Ξ±
] :
Nontrivial: Type ?u.25702 β†’ Prop
Nontrivial
Ξ±: Type ?u.25684
Ξ±
where exists_pair_ne := ⟨
1: ?m.25722
1
,
0: ?m.25927
0
, (
Nat.cast_one: βˆ€ {R : Type ?u.26344} [inst : AddMonoidWithOne R], ↑1 = 1
Nat.cast_one
(R :=
Ξ±: Type ?u.25684
Ξ±
) β–Έ
Nat.cast_ne_zero: βˆ€ {R : Type ?u.26349} [inst : AddMonoidWithOne R] [inst_1 : CharZero R] {n : β„•}, ↑n β‰  0 ↔ n β‰  0
Nat.cast_ne_zero
.
2: βˆ€ {a b : Prop}, (a ↔ b) β†’ b β†’ a
2
(

Goals accomplished! πŸ™
Ξ±: Type ?u.25684

Ξ²: Type ?u.25687

inst✝¹: AddMonoidWithOne α

inst✝: CharZero α


1 β‰  0

Goals accomplished! πŸ™
))⟩ section AddMonoidHomClass variable {
A: Type ?u.33337
A
B: Type ?u.26449
B
F: Type ?u.35455
F
:
Type _: Type (?u.35452+1)
Type _
} [
AddMonoidWithOne: Type ?u.35458 β†’ Type ?u.35458
AddMonoidWithOne
B: Type ?u.26449
B
] theorem
ext_nat': βˆ€ {A : Type u_1} {F : Type u_2} [inst : AddMonoid A] [inst_1 : AddMonoidHomClass F β„• A] (f g : F), ↑f 1 = ↑g 1 β†’ f = g
ext_nat'
[
AddMonoid: Type ?u.26476 β†’ Type ?u.26476
AddMonoid
A: Type ?u.26464
A
] [
AddMonoidHomClass: Type ?u.26481 β†’ (M : outParam (Type ?u.26480)) β†’ (N : outParam (Type ?u.26479)) β†’ [inst : AddZeroClass M] β†’ [inst : AddZeroClass N] β†’ Type (max(max?u.26481?u.26480)?u.26479)
AddMonoidHomClass
F: Type ?u.26470
F
β„•: Type
β„•
A: Type ?u.26464
A
] (
f: F
f
g: F
g
:
F: Type ?u.26470
F
) (
h: ↑f 1 = ↑g 1
h
:
f: F
f
1: ?m.27487
1
=
g: F
g
1: ?m.28454
1
) :
f: F
f
=
g: F
g
:=
FunLike.ext: βˆ€ {F : Sort ?u.28469} {Ξ± : Sort ?u.28470} {Ξ² : Ξ± β†’ Sort ?u.28468} [i : FunLike F Ξ± Ξ²] (f g : F), (βˆ€ (x : Ξ±), ↑f x = ↑g x) β†’ f = g
FunLike.ext
f: F
f
g: F
g
<|

Goals accomplished! πŸ™
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1


βˆ€ (x : β„•), ↑f x = ↑g x
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1

n: β„•


↑f n = ↑g n
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1


βˆ€ (x : β„•), ↑f x = ↑g x
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1

n: β„•


↑f n = ↑g n
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1


zero
↑f Nat.zero = ↑g Nat.zero
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1


zero
↑f Nat.zero = ↑g Nat.zero
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1


zero
↑f 0 = ↑g 0
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1


zero
↑f Nat.zero = ↑g Nat.zero
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1


zero
0 = ↑g 0
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1


zero
↑f Nat.zero = ↑g Nat.zero

Goals accomplished! πŸ™

Goals accomplished! πŸ™
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1

n: β„•


↑f n = ↑g n
Ξ±: Type ?u.26458

Ξ²: Type ?u.26461

A: Type u_1

B: Type ?u.26467

F: Type u_2

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoid A

inst✝: AddMonoidHomClass F β„• A

f, g: F

h: ↑f 1 = ↑g 1

n: β„•

ihn: ↑f n = ↑g n


succ
↑f (Nat.succ n) = ↑g (Nat.succ n)

Goals accomplished! πŸ™
#align ext_nat'
ext_nat': βˆ€ {A : Type u_1} {F : Type u_2} [inst : AddMonoid A] [inst_1 : AddMonoidHomClass F β„• A] (f g : F), ↑f 1 = ↑g 1 β†’ f = g
ext_nat'
@[ext] theorem
AddMonoidHom.ext_nat: βˆ€ [inst : AddMonoid A] {f g : β„• β†’+ A}, ↑f 1 = ↑g 1 β†’ f = g
AddMonoidHom.ext_nat
[
AddMonoid: Type ?u.33349 β†’ Type ?u.33349
AddMonoid
A: Type ?u.33337
A
] {f g :
β„•: Type
β„•
β†’+
A: Type ?u.33337
A
} : f
1: ?m.34371
1
= g
1: ?m.35344
1
β†’ f = g :=
ext_nat': βˆ€ {A : Type ?u.35355} {F : Type ?u.35356} [inst : AddMonoid A] [inst_1 : AddMonoidHomClass F β„• A] (f g : F), ↑f 1 = ↑g 1 β†’ f = g
ext_nat'
f g #align add_monoid_hom.ext_nat
AddMonoidHom.ext_nat: βˆ€ {A : Type u_1} [inst : AddMonoid A] {f g : β„• β†’+ A}, ↑f 1 = ↑g 1 β†’ f = g
AddMonoidHom.ext_nat
variable [
AddMonoidWithOne: Type ?u.40894 β†’ Type ?u.40894
AddMonoidWithOne
A: Type ?u.35470
A
] -- these versions are primed so that the `RingHomClass` versions aren't theorem
eq_natCast': βˆ€ [inst : AddMonoidHomClass F β„• A] (f : F), ↑f 1 = 1 β†’ βˆ€ (n : β„•), ↑f n = ↑n
eq_natCast'
[
AddMonoidHomClass: Type ?u.35487 β†’ (M : outParam (Type ?u.35486)) β†’ (N : outParam (Type ?u.35485)) β†’ [inst : AddZeroClass M] β†’ [inst : AddZeroClass N] β†’ Type (max(max?u.35487?u.35486)?u.35485)
AddMonoidHomClass
F: Type ?u.35476
F
β„•: Type
β„•
A: Type ?u.35470
A
] (
f: F
f
:
F: Type ?u.35476
F
) (
h1: ↑f 1 = 1
h1
:
f: F
f
1: ?m.36497
1
=
1: ?m.36508
1
) : βˆ€ n :
β„•: Type
β„•
,
f: F
f
n = n | 0 =>

Goals accomplished! πŸ™
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1


↑f 0 = ↑0

Goals accomplished! πŸ™
| n + 1 =>

Goals accomplished! πŸ™
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑f (n + 1) = ↑(n + 1)
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑f (n + 1) = ↑(n + 1)
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑f n + ↑f 1 = ↑(n + 1)
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑f (n + 1) = ↑(n + 1)
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑f n + 1 = ↑(n + 1)
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑f (n + 1) = ↑(n + 1)
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑n + 1 = ↑(n + 1)
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑f (n + 1) = ↑(n + 1)
Ξ±: Type ?u.35464

Ξ²: Type ?u.35467

A: Type u_2

B: Type ?u.35473

F: Type u_1

inst✝²: AddMonoidWithOne B

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F β„• A

f: F

h1: ↑f 1 = 1

n: β„•


↑n + 1 = ↑n + 1

Goals accomplished! πŸ™
#align eq_nat_cast'
eq_natCast': βˆ€ {A : Type u_2} {F : Type u_1} [inst : AddMonoidWithOne A] [inst_1 : AddMonoidHomClass F β„• A] (f : F), ↑f 1 = 1 β†’ βˆ€ (n : β„•), ↑f n = ↑n
eq_natCast'
theorem
map_natCast': βˆ€ {B : Type u_3} {F : Type u_2} [inst : AddMonoidWithOne B] {A : Type u_1} [inst_1 : AddMonoidWithOne A] [inst_2 : AddMonoidHomClass F A B] (f : F), ↑f 1 = 1 β†’ βˆ€ (n : β„•), ↑f ↑n = ↑n
map_natCast'
{
A: Type u_1
A
} [
AddMonoidWithOne: Type ?u.40900 β†’ Type ?u.40900
AddMonoidWithOne
A: ?m.40897
A
] [
AddMonoidHomClass: Type ?u.40905 β†’ (M : outParam (Type ?u.40904)) β†’ (N : outParam (Type ?u.40903)) β†’ [inst : AddZeroClass M] β†’ [inst : AddZeroClass N] β†’ Type (max(max?u.40905?u.40904)?u.40903)
AddMonoidHomClass
F: Type ?u.40888
F
A: ?m.40897
A
B: Type ?u.40885
B
] (
f: F
f
:
F: Type ?u.40888
F
) (
h: ↑f 1 = 1
h
:
f: F
f
1: ?m.41921
1
=
1: ?m.42117
1
) : βˆ€ n :
β„•: Type
β„•
,
f: F
f
n = n | 0 =>

Goals accomplished! πŸ™
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1


↑f ↑0 = ↑0

Goals accomplished! πŸ™
| n + 1 =>

Goals accomplished! πŸ™
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑(n + 1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑(n + 1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f (↑n + ↑1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑(n + 1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑n + ↑f ↑1 = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑(n + 1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑n + ↑f ↑1 = ↑n + ↑1
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑(n + 1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑n + ↑f ↑1 = ↑n + ↑1
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑(n + 1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑n + ↑f 1 = ↑n + ↑1
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑(n + 1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑n + 1 = ↑n + ↑1
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑f ↑(n + 1) = ↑(n + 1)
Ξ±: Type ?u.40876

Ξ²: Type ?u.40879

A✝: Type ?u.40882

B: Type u_3

F: Type u_2

inst✝³: AddMonoidWithOne B

inst✝²: AddMonoidWithOne A✝

A: Type u_1

inst✝¹: AddMonoidWithOne A

inst✝: AddMonoidHomClass F A B

f: F

h: ↑f 1 = 1

n: β„•


↑n + 1 = ↑n + 1

Goals accomplished! πŸ™
#align map_nat_cast'
map_natCast': βˆ€ {B : Type u_3} {F : Type u_2} [inst : AddMonoidWithOne B] {A : Type u_1} [inst_1 : AddMonoidWithOne A] [inst_2 : AddMonoidHomClass F A B] (f : F), ↑f 1 = 1 β†’ βˆ€ (n : β„•), ↑f ↑n = ↑n
map_natCast'
end AddMonoidHomClass section MonoidWithZeroHomClass variable {
A: Type ?u.48254
A
F: Type ?u.48257
F
:
Type _: Type (?u.48242+1)
Type _
} [
MulZeroOneClass: Type ?u.48245 β†’ Type ?u.48245
MulZeroOneClass
A: Type ?u.48239
A
] /-- If two `MonoidWithZeroHom`s agree on the positive naturals they are equal. -/ theorem
ext_nat'': βˆ€ [inst : MonoidWithZeroHomClass F β„• A] (f g : F), (βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n) β†’ f = g
ext_nat''
[
MonoidWithZeroHomClass: Type ?u.48265 β†’ (M : outParam (Type ?u.48264)) β†’ (N : outParam (Type ?u.48263)) β†’ [inst : MulZeroOneClass M] β†’ [inst : MulZeroOneClass N] β†’ Type (max(max?u.48265?u.48264)?u.48263)
MonoidWithZeroHomClass
F: Type ?u.48257
F
β„•: Type
β„•
A: Type ?u.48254
A
] (
f: F
f
g: F
g
:
F: Type ?u.48257
F
) (
h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n
h_pos
: βˆ€ {n :
β„•: Type
β„•
},
0: ?m.48305
0
< n β†’
f: F
f
n =
g: F
g
n) :
f: F
f
=
g: F
g
:=

Goals accomplished! πŸ™
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n


f = g
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n


h
βˆ€ (x : β„•), ↑f x = ↑g x
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n


f = g
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n


h.zero
↑f Nat.zero = ↑g Nat.zero
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n

n: β„•


h.succ
↑f (Nat.succ n) = ↑g (Nat.succ n)
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n


f = g
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n


h.zero
↑f Nat.zero = ↑g Nat.zero
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n


h.zero
↑f Nat.zero = ↑g Nat.zero
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n

n: β„•


h.succ
↑f (Nat.succ n) = ↑g (Nat.succ n)

Goals accomplished! πŸ™
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n


f = g
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n

n: β„•


h.succ
↑f (Nat.succ n) = ↑g (Nat.succ n)
Ξ±: Type ?u.48248

Ξ²: Type ?u.48251

A: Type u_2

F: Type u_1

inst✝¹: MulZeroOneClass A

inst✝: MonoidWithZeroHomClass F β„• A

f, g: F

h_pos: βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n

n: β„•


h.succ
↑f (Nat.succ n) = ↑g (Nat.succ n)

Goals accomplished! πŸ™
#align ext_nat''
ext_nat'': βˆ€ {A : Type u_2} {F : Type u_1} [inst : MulZeroOneClass A] [inst_1 : MonoidWithZeroHomClass F β„• A] (f g : F), (βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n) β†’ f = g
ext_nat''
@[ext] theorem
MonoidWithZeroHom.ext_nat: βˆ€ {f g : β„• β†’*β‚€ A}, (βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n) β†’ f = g
MonoidWithZeroHom.ext_nat
{f g :
β„•: Type
β„•
β†’*β‚€
A: Type ?u.51912
A
} : (βˆ€ {n :
β„•: Type
β„•
},
0: ?m.51965
0
< n β†’ f n = g n) β†’ f = g :=
ext_nat'': βˆ€ {A : Type ?u.53467} {F : Type ?u.53466} [inst : MulZeroOneClass A] [inst_1 : MonoidWithZeroHomClass F β„• A] (f g : F), (βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n) β†’ f = g
ext_nat''
f g #align monoid_with_zero_hom.ext_nat
MonoidWithZeroHom.ext_nat: βˆ€ {A : Type u_1} [inst : MulZeroOneClass A] {f g : β„• β†’*β‚€ A}, (βˆ€ {n : β„•}, 0 < n β†’ ↑f n = ↑g n) β†’ f = g
MonoidWithZeroHom.ext_nat
end MonoidWithZeroHomClass section RingHomClass variable {
R: Type ?u.53572
R
S: Type ?u.53575
S
F: Type ?u.57182
F
:
Type _: Type (?u.57179+1)
Type _
} [
NonAssocSemiring: Type ?u.59361 β†’ Type ?u.59361
NonAssocSemiring
R: Type ?u.53572
R
] [
NonAssocSemiring: Type ?u.55176 β†’ Type ?u.55176
NonAssocSemiring
S: Type ?u.53554
S
] @[simp] theorem
eq_natCast: βˆ€ {R : Type u_2} {F : Type u_1} [inst : NonAssocSemiring R] [inst_1 : RingHomClass F β„• R] (f : F) (n : β„•), ↑f n = ↑n
eq_natCast
[
RingHomClass: Type ?u.53589 β†’ (Ξ± : outParam (Type ?u.53588)) β†’ (Ξ² : outParam (Type ?u.53587)) β†’ [inst : NonAssocSemiring Ξ±] β†’ [inst : NonAssocSemiring Ξ²] β†’ Type (max(max?u.53589?u.53588)?u.53587)
RingHomClass
F: Type ?u.53578
F
β„•: Type
β„•
R: Type ?u.53572
R
] (
f: F
f
:
F: Type ?u.53578
F
) : βˆ€
n: ?m.53616
n
,
f: F
f
n: ?m.53616
n
=
n: ?m.53616
n
:=
eq_natCast': βˆ€ {A : Type ?u.54584} {F : Type ?u.54583} [inst : AddMonoidWithOne A] [inst_1 : AddMonoidHomClass F β„• A] (f : F), ↑f 1 = 1 β†’ βˆ€ (n : β„•), ↑f n = ↑n
eq_natCast'
f: F
f
<|
map_one: βˆ€ {M : Type ?u.54761} {N : Type ?u.54762} {F : Type ?u.54760} [inst : One M] [inst_1 : One N] [inst_2 : OneHomClass F M N] (f : F), ↑f 1 = 1
map_one
f: F
f
#align eq_nat_cast
eq_natCast: βˆ€ {R : Type u_2} {F : Type u_1} [inst : NonAssocSemiring R] [inst_1 : RingHomClass F β„• R] (f : F) (n : β„•), ↑f n = ↑n
eq_natCast
@[simp] theorem
map_natCast: βˆ€ {R : Type u_2} {S : Type u_3} {F : Type u_1} [inst : NonAssocSemiring R] [inst_1 : NonAssocSemiring S] [inst_2 : RingHomClass F R S] (f : F) (n : β„•), ↑f ↑n = ↑n
map_natCast
[
RingHomClass: Type ?u.55181 β†’ (Ξ± : outParam (Type ?u.55180)) β†’ (Ξ² : outParam (Type ?u.55179)) β†’ [inst : NonAssocSemiring Ξ±] β†’ [inst : NonAssocSemiring Ξ²] β†’ Type (max(max?u.55181?u.55180)?u.55179)
RingHomClass
F: Type ?u.55170
F
R: Type ?u.55164
R
S: Type ?u.55167
S
] (
f: F
f
:
F: Type ?u.55170
F
) : βˆ€ n :
β„•: Type
β„•
,
f: F
f
(n :
R: Type ?u.55164
R
) = n :=
map_natCast': βˆ€ {B : Type ?u.56359} {F : Type ?u.56358} [inst : AddMonoidWithOne B] {A : Type ?u.56357} [inst_1 : AddMonoidWithOne A] [inst_2 : AddMonoidHomClass F A B] (f : F), ↑f 1 = 1 β†’ βˆ€ (n : β„•), ↑f ↑n = ↑n
map_natCast'
f: F
f
<|
map_one: βˆ€ {M : Type ?u.56634} {N : Type ?u.56635} {F : Type ?u.56633} [inst : One M] [inst_1 : One N] [inst_2 : OneHomClass F M N] (f : F), ↑f 1 = 1
map_one
f: F
f
#align map_nat_cast
map_natCast: βˆ€ {R : Type u_2} {S : Type u_3} {F : Type u_1} [inst : NonAssocSemiring R] [inst_1 : NonAssocSemiring S] [inst_2 : RingHomClass F R S] (f : F) (n : β„•), ↑f ↑n = ↑n
map_natCast
--Porting note: new theorem @[simp] theorem
map_ofNat: βˆ€ {R : Type u_2} {S : Type u_3} {F : Type u_1} [inst : NonAssocSemiring R] [inst_1 : NonAssocSemiring S] [inst_2 : RingHomClass F R S] (f : F) (n : β„•) [inst_3 : Nat.AtLeastTwo n], ↑f (OfNat.ofNat n) = OfNat.ofNat n
map_ofNat
[
RingHomClass: Type ?u.57193 β†’ (Ξ± : outParam (Type ?u.57192)) β†’ (Ξ² : outParam (Type ?u.57191)) β†’ [inst : NonAssocSemiring Ξ±] β†’ [inst : NonAssocSemiring Ξ²] β†’ Type (max(max?u.57193?u.57192)?u.57191)
RingHomClass
F: Type ?u.57182
F
R: Type ?u.57176
R
S: Type ?u.57179
S
] (
f: F
f
:
F: Type ?u.57182
F
) (n :
β„•: Type
β„•
) [
Nat.AtLeastTwo: β„• β†’ Prop
Nat.AtLeastTwo
n] : (
f: F
f
(
OfNat.ofNat: {Ξ± : Type ?u.57735} β†’ (x : β„•) β†’ [self : OfNat Ξ± x] β†’ Ξ±
OfNat.ofNat
n) :
S: Type ?u.57179
S
) =
OfNat.ofNat: {Ξ± : Type ?u.57908} β†’ (x : β„•) β†’ [self : OfNat Ξ± x] β†’ Ξ±
OfNat.ofNat
n :=
map_natCast: βˆ€ {R : Type ?u.58143} {S : Type ?u.58144} {F : Type ?u.58142} [inst : NonAssocSemiring R] [inst_1 : NonAssocSemiring S] [inst_2 : RingHomClass F R S] (f : F) (n : β„•), ↑f ↑n = ↑n
map_natCast
f: F
f
n theorem
ext_nat: βˆ€ [inst : RingHomClass F β„• R] (f g : F), f = g
ext_nat
[
RingHomClass: Type ?u.58259 β†’ (Ξ± : outParam (Type ?u.58258)) β†’ (Ξ² : outParam (Type ?u.58257)) β†’ [inst : NonAssocSemiring Ξ±] β†’ [inst : NonAssocSemiring Ξ²] β†’ Type (max(max?u.58259?u.58258)?u.58257)
RingHomClass
F: Type ?u.58248
F
β„•: Type
β„•
R: Type ?u.58242
R
] (
f: F
f
g: F
g
:
F: Type ?u.58248
F
) :
f: F
f
=
g: F
g
:=
ext_nat': βˆ€ {A : Type ?u.58293} {F : Type ?u.58294} [inst : AddMonoid A] [inst_1 : AddMonoidHomClass F β„• A] (f g : F), ↑f 1 = ↑g 1 β†’ f = g
ext_nat'
f: F
f
g: F
g
<|

Goals accomplished! πŸ™
Ξ±: Type ?u.58236

Ξ²: Type ?u.58239

R: Type u_2

S: Type ?u.58245

F: Type u_1

inst✝²: NonAssocSemiring R

inst✝¹: NonAssocSemiring S

inst✝: RingHomClass F β„• R

f, g: F


↑f 1 = ↑g 1

Goals accomplished! πŸ™
#align ext_nat
ext_nat: βˆ€ {R : Type u_2} {F : Type u_1} [inst : NonAssocSemiring R] [inst : RingHomClass F β„• R] (f g : F), f = g
ext_nat
theorem
NeZero.nat_of_injective: βˆ€ {n : β„•} [h : NeZero ↑n] [inst : RingHomClass F R S] {f : F}, Function.Injective ↑f β†’ NeZero ↑n
NeZero.nat_of_injective
{n :
β„•: Type
β„•
} [
h: NeZero ↑n
h
:
NeZero: {R : Type ?u.59369} β†’ [inst : Zero R] β†’ R β†’ Prop
NeZero
(n :
R: Type ?u.59352
R
)] [
RingHomClass: Type ?u.59786 β†’ (Ξ± : outParam (Type ?u.59785)) β†’ (Ξ² : outParam (Type ?u.59784)) β†’ [inst : NonAssocSemiring Ξ±] β†’ [inst : NonAssocSemiring Ξ²] β†’ Type (max(max?u.59786?u.59785)?u.59784)
RingHomClass
F: Type ?u.59358
F
R: Type ?u.59352
R
S: Type ?u.59355
S
] {
f: F
f
:
F: Type ?u.59358
F
} (
hf: Function.Injective ↑f
hf
:
Function.Injective: {Ξ± : Sort ?u.59802} β†’ {Ξ² : Sort ?u.59801} β†’ (Ξ± β†’ Ξ²) β†’ Prop
Function.Injective
f: F
f
) :
NeZero: {R : Type ?u.60327} β†’ [inst : Zero R] β†’ R β†’ Prop
NeZero
(n :
S: Type ?u.59355
S
) := ⟨fun
h: ?m.60790
h
↦
NeZero.natCast_ne: βˆ€ (n : β„•) (R : Type ?u.60792) [inst : AddMonoidWithOne R] [h : NeZero ↑n], ↑n β‰  0
NeZero.natCast_ne
n
R: Type ?u.59352
R
<|
hf: Function.Injective ↑f
hf
<|

Goals accomplished! πŸ™
Ξ±: Type ?u.59346

Ξ²: Type ?u.59349

R: Type u_1

S: Type u_3

F: Type u_2

inst✝²: NonAssocSemiring R

inst✝¹: NonAssocSemiring S

n: β„•

h✝: NeZero ↑n

inst✝: RingHomClass F R S

f: F

hf: Function.Injective ↑f

h: ↑n = 0


↑f ↑n = ↑f 0

Goals accomplished! πŸ™
⟩ #align ne_zero.nat_of_injective
NeZero.nat_of_injective: βˆ€ {R : Type u_1} {S : Type u_3} {F : Type u_2} [inst : NonAssocSemiring R] [inst_1 : NonAssocSemiring S] {n : β„•} [h : NeZero ↑n] [inst_2 : RingHomClass F R S] {f : F}, Function.Injective ↑f β†’ NeZero ↑n
NeZero.nat_of_injective
theorem
NeZero.nat_of_neZero: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : Semiring S] {F : Type u_3} [inst_2 : RingHomClass F R S], F β†’ βˆ€ {n : β„•} [hn : NeZero ↑n], NeZero ↑n
NeZero.nat_of_neZero
{
R: Type u_1
R
S: ?m.61830
S
} [
Semiring: Type ?u.61833 β†’ Type ?u.61833
Semiring
R: ?m.61827
R
] [
Semiring: Type ?u.61836 β†’ Type ?u.61836
Semiring
S: ?m.61830
S
] {
F: ?m.61839
F
} [
RingHomClass: Type ?u.61844 β†’ (Ξ± : outParam (Type ?u.61843)) β†’ (Ξ² : outParam (Type ?u.61842)) β†’ [inst : NonAssocSemiring Ξ±] β†’ [inst : NonAssocSemiring Ξ²] β†’ Type (max(max?u.61844?u.61843)?u.61842)
RingHomClass
F: ?m.61839
F
R: ?m.61827
R
S: ?m.61830
S
] (
f: F
f
:
F: ?m.61839
F
) {n :
β„•: Type
β„•
} [
hn: NeZero ↑n
hn
:
NeZero: {R : Type ?u.61881} β†’ [inst : Zero R] β†’ R β†’ Prop
NeZero
(n :
S: ?m.61830
S
)] :
NeZero: {R : Type ?u.62079} β†’ [inst : Zero R] β†’ R β†’ Prop
NeZero
(n :
R: ?m.61827
R
) :=
.of_map: βˆ€ {F : Type ?u.62287} {R : Type ?u.62285} {M : Type ?u.62286} [inst : Zero R] [inst_1 : Zero M] [inst_2 : ZeroHomClass F R M] (f : F) {r : R} [neZero : NeZero (↑f r)], NeZero r
.of_map
(f :=
f: F
f
) (neZero :=

Goals accomplished! πŸ™
Ξ±: Type ?u.61806

Ξ²: Type ?u.61809

R✝: Type ?u.61812

S✝: Type ?u.61815

F✝: Type ?u.61818

inst✝⁴: NonAssocSemiring R✝

inst✝³: NonAssocSemiring S✝

R: Type u_1

S: Type u_2

inst✝²: Semiring R

inst✝¹: Semiring S

F: Type u_3

inst✝: RingHomClass F R S

f: F

n: β„•

hn: NeZero ↑n


NeZero (↑f ↑n)

Goals accomplished! πŸ™
) #align ne_zero.nat_of_ne_zero
NeZero.nat_of_neZero: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : Semiring S] {F : Type u_3} [inst_2 : RingHomClass F R S], F β†’ βˆ€ {n : β„•} [hn : NeZero ↑n], NeZero ↑n
NeZero.nat_of_neZero
end RingHomClass namespace RingHom /-- This is primed to match `eq_intCast'`. -/ theorem
eq_natCast': βˆ€ {R : Type u_1} [inst : NonAssocSemiring R] (f : β„• β†’+* R), f = Nat.castRingHom R
eq_natCast'
{
R: ?m.62990
R
} [
NonAssocSemiring: Type ?u.62993 β†’ Type ?u.62993
NonAssocSemiring
R: ?m.62990
R
] (f :
β„•: Type
β„•
β†’+*
R: ?m.62990
R
) : f =
Nat.castRingHom: (Ξ± : Type ?u.63021) β†’ [inst : NonAssocSemiring Ξ±] β†’ β„• β†’+* Ξ±
Nat.castRingHom
R: ?m.62990
R
:=
RingHom.ext: βˆ€ {Ξ± : Type ?u.63032} {Ξ² : Type ?u.63033} {x : NonAssocSemiring Ξ±} {x_1 : NonAssocSemiring Ξ²} ⦃f g : Ξ± β†’+* β⦄, (βˆ€ (x_2 : Ξ±), ↑f x_2 = ↑g x_2) β†’ f = g
RingHom.ext
<|
eq_natCast: βˆ€ {R : Type ?u.63049} {F : Type ?u.63048} [inst : NonAssocSemiring R] [inst_1 : RingHomClass F β„• R] (f : F) (n : β„•), ↑f n = ↑n
eq_natCast
f #align ring_hom.eq_nat_cast'
RingHom.eq_natCast': βˆ€ {R : Type u_1} [inst : NonAssocSemiring R] (f : β„• β†’+* R), f = Nat.castRingHom R
RingHom.eq_natCast'
end RingHom @[simp, norm_cast] theorem
Nat.cast_id: βˆ€ (n : β„•), ↑n = n
Nat.cast_id
(n :
β„•: Type
β„•
) : n.
cast: {R : Type ?u.63109} β†’ [inst : NatCast R] β†’ β„• β†’ R
cast
= n :=
rfl: βˆ€ {Ξ± : Sort ?u.63154} {a : Ξ±}, a = a
rfl
#align nat.cast_id
Nat.cast_id: βˆ€ (n : β„•), ↑n = n
Nat.cast_id
@[simp] theorem
Nat.castRingHom_nat: castRingHom β„• = RingHom.id β„•
Nat.castRingHom_nat
:
Nat.castRingHom: (Ξ± : Type ?u.63190) β†’ [inst : NonAssocSemiring Ξ±] β†’ β„• β†’+* Ξ±
Nat.castRingHom
β„•: Type
β„•
=
RingHom.id: (Ξ± : Type ?u.63206) β†’ [inst : NonAssocSemiring Ξ±] β†’ Ξ± β†’+* Ξ±
RingHom.id
β„•: Type
β„•
:=
rfl: βˆ€ {Ξ± : Sort ?u.63214} {a : Ξ±}, a = a
rfl
#align nat.cast_ring_hom_nat Nat.castRingHom_nat /-- We don't use `RingHomClass` here, since that might cause type-class slowdown for `Subsingleton`-/ instance
Nat.uniqueRingHom: {R : Type u_1} β†’ [inst : NonAssocSemiring R] β†’ Unique (β„• β†’+* R)
Nat.uniqueRingHom
{
R: Type ?u.63256
R
:
Type _: Type (?u.63256+1)
Type _
} [
NonAssocSemiring: Type ?u.63259 β†’ Type ?u.63259
NonAssocSemiring
R: Type ?u.63256
R
] :
Unique: Sort ?u.63262 β†’ Sort (max1?u.63262)
Unique
(
β„•: Type
β„•
β†’+*
R: Type ?u.63256
R
) where default :=
Nat.castRingHom: (Ξ± : Type ?u.63295) β†’ [inst : NonAssocSemiring Ξ±] β†’ β„• β†’+* Ξ±
Nat.castRingHom
R: Type ?u.63256
R
uniq :=
RingHom.eq_natCast': βˆ€ {R : Type ?u.63304} [inst : NonAssocSemiring R] (f : β„• β†’+* R), f = castRingHom R
RingHom.eq_natCast'
namespace Pi variable {
Ο€: Ξ± β†’ Type ?u.64938
Ο€
:
Ξ±: Type ?u.63375
Ξ±
β†’
Type _: Type (?u.63364+1)
Type _
} [βˆ€
a: ?m.63368
a
,
NatCast: Type ?u.63371 β†’ Type ?u.63371
NatCast
(
Ο€: Ξ± β†’ Type ?u.63364
Ο€
a: ?m.63368
a
)] /- Porting note: manually wrote this instance. Was `by refine_struct { .. } <;> pi_instance_derive_field` -/ instance
natCast: NatCast ((a : Ξ±) β†’ Ο€ a)
natCast
:
NatCast: Type ?u.63394 β†’ Type ?u.63394
NatCast
(βˆ€
a: ?m.63396
a
,
Ο€: Ξ± β†’ Type ?u.63383
Ο€
a: ?m.63396
a
) := { natCast := fun
n: ?m.63407
n
_: ?m.63410
_
↦
n: ?m.63407
n
} theorem
nat_apply: βˆ€ {Ξ± : Type u_2} {Ο€ : Ξ± β†’ Type u_1} [inst : (a : Ξ±) β†’ NatCast (Ο€ a)] (n : β„•) (a : Ξ±), ↑n a = ↑n
nat_apply
(n :
β„•: Type
β„•
) (
a: Ξ±
a
:
Ξ±: Type ?u.63536
Ξ±
) : (n : βˆ€
a: ?m.63562
a
,
Ο€: Ξ± β†’ Type ?u.63544
Ο€
a: ?m.63562
a
)
a: Ξ±
a
= n :=
rfl: βˆ€ {Ξ± : Sort ?u.64910} {a : Ξ±}, a = a
rfl
#align pi.nat_apply
Pi.nat_apply: βˆ€ {Ξ± : Type u_2} {Ο€ : Ξ± β†’ Type u_1} [inst : (a : Ξ±) β†’ NatCast (Ο€ a)] (n : β„•) (a : Ξ±), ↑n a = ↑n
Pi.nat_apply
@[simp] theorem
coe_nat: βˆ€ {Ξ± : Type u_1} {Ο€ : Ξ± β†’ Type u_2} [inst : (a : Ξ±) β†’ NatCast (Ο€ a)] (n : β„•), ↑n = fun x => ↑n
coe_nat
(n :
β„•: Type
β„•
) : (n : βˆ€
a: ?m.64954
a
,
Ο€: Ξ± β†’ Type ?u.64938
Ο€
a: ?m.64954
a
) = fun
_: ?m.66225
_
↦ ↑n :=
rfl: βˆ€ {Ξ± : Sort ?u.66316} {a : Ξ±}, a = a
rfl
#align pi.coe_nat
Pi.coe_nat: βˆ€ {Ξ± : Type u_1} {Ο€ : Ξ± β†’ Type u_2} [inst : (a : Ξ±) β†’ NatCast (Ο€ a)] (n : β„•), ↑n = fun x => ↑n
Pi.coe_nat
end Pi theorem
Sum.elim_natCast_natCast: βˆ€ {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} [inst : NatCast Ξ³] (n : β„•), Sum.elim ↑n ↑n = ↑n
Sum.elim_natCast_natCast
{
Ξ±: Type ?u.66355
Ξ±
Ξ²: Type ?u.66358
Ξ²
Ξ³: Type ?u.66361
Ξ³
:
Type _: Type (?u.66355+1)
Type _
} [
NatCast: Type ?u.66364 β†’ Type ?u.66364
NatCast
Ξ³: Type ?u.66361
Ξ³
] (n :
β„•: Type
β„•
) :
Sum.elim: {Ξ± : Type ?u.66372} β†’ {Ξ² : Type ?u.66371} β†’ {Ξ³ : Sort ?u.66370} β†’ (Ξ± β†’ Ξ³) β†’ (Ξ² β†’ Ξ³) β†’ Ξ± βŠ• Ξ² β†’ Ξ³
Sum.elim
(n :
Ξ±: Type ?u.66355
Ξ±
β†’
Ξ³: Type ?u.66361
Ξ³
) (n :
Ξ²: Type ?u.66358
Ξ²
β†’
Ξ³: Type ?u.66361
Ξ³
) = n := @
Sum.elim_lam_const_lam_const: βˆ€ {Ξ± : Type ?u.70246} {Ξ² : Type ?u.70245} {Ξ³ : Type ?u.70247} (c : Ξ³), (Sum.elim (fun x => c) fun x => c) = fun x => c
Sum.elim_lam_const_lam_const
Ξ±: Type u_1
Ξ±
Ξ²: Type u_2
Ξ²
Ξ³: Type u_3
Ξ³
n #align sum.elim_nat_cast_nat_cast
Sum.elim_natCast_natCast: βˆ€ {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} [inst : NatCast Ξ³] (n : β„•), Sum.elim ↑n ↑n = ↑n
Sum.elim_natCast_natCast
/-! ### Order dual -/ open OrderDual
instance: {Ξ± : Type u_1} β†’ [h : NatCast Ξ±] β†’ NatCast Ξ±α΅’α΅ˆ
instance
[
h: NatCast Ξ±
h
:
NatCast: Type ?u.70320 β†’ Type ?u.70320
NatCast
Ξ±: Type ?u.70314
Ξ±
] :
NatCast: Type ?u.70323 β†’ Type ?u.70323
NatCast
Ξ±: Type ?u.70314
Ξ±
α΅’α΅ˆ :=
h: NatCast Ξ±
h
instance: {Ξ± : Type u_1} β†’ [h : AddMonoidWithOne Ξ±] β†’ AddMonoidWithOne Ξ±α΅’α΅ˆ
instance
[h :
AddMonoidWithOne: Type ?u.70364 β†’ Type ?u.70364
AddMonoidWithOne
Ξ±: Type ?u.70358
Ξ±
] :
AddMonoidWithOne: Type ?u.70367 β†’ Type ?u.70367
AddMonoidWithOne
Ξ±: Type ?u.70358
Ξ±
α΅’α΅ˆ := h
instance: {Ξ± : Type u_1} β†’ [h : AddCommMonoidWithOne Ξ±] β†’ AddCommMonoidWithOne Ξ±α΅’α΅ˆ
instance
[h :
AddCommMonoidWithOne: Type ?u.70408 β†’ Type ?u.70408
AddCommMonoidWithOne
Ξ±: Type ?u.70402
Ξ±
] :
AddCommMonoidWithOne: Type ?u.70411 β†’ Type ?u.70411
AddCommMonoidWithOne
Ξ±: Type ?u.70402
Ξ±
α΅’α΅ˆ := h @[simp] theorem
toDual_natCast: βˆ€ {Ξ± : Type u_1} [inst : NatCast Ξ±] (n : β„•), ↑toDual ↑n = ↑n
toDual_natCast
[
NatCast: Type ?u.70452 β†’ Type ?u.70452
NatCast
Ξ±: Type ?u.70446
Ξ±
] (n :
β„•: Type
β„•
) :
toDual: {Ξ± : Type ?u.70458} β†’ Ξ± ≃ Ξ±α΅’α΅ˆ
toDual
(n :
Ξ±: Type ?u.70446
Ξ±
) = n :=
rfl: βˆ€ {Ξ± : Sort ?u.70683} {a : Ξ±}, a = a
rfl
#align to_dual_nat_cast
toDual_natCast: βˆ€ {Ξ± : Type u_1} [inst : NatCast Ξ±] (n : β„•), ↑toDual ↑n = ↑n
toDual_natCast
@[simp] theorem
ofDual_natCast: βˆ€ {Ξ± : Type u_1} [inst : NatCast Ξ±] (n : β„•), ↑(↑ofDual n) = ↑n
ofDual_natCast
[
NatCast: Type ?u.70725 β†’ Type ?u.70725
NatCast
Ξ±: Type ?u.70719
Ξ±
] (n :
β„•: Type
β„•
) : (
ofDual: {Ξ± : Type ?u.70732} β†’ Ξ±α΅’α΅ˆ ≃ Ξ±
ofDual
n :
Ξ±: Type ?u.70719
Ξ±
) = n :=
rfl: βˆ€ {Ξ± : Sort ?u.70933} {a : Ξ±}, a = a
rfl
#align of_dual_nat_cast
ofDual_natCast: βˆ€ {Ξ± : Type u_1} [inst : NatCast Ξ±] (n : β„•), ↑(↑ofDual n) = ↑n
ofDual_natCast
/-! ### Lexicographic order -/
instance: {Ξ± : Type u_1} β†’ [h : NatCast Ξ±] β†’ NatCast (Lex Ξ±)
instance
[
h: NatCast Ξ±
h
:
NatCast: Type ?u.70975 β†’ Type ?u.70975
NatCast
Ξ±: Type ?u.70969
Ξ±
] :
NatCast: Type ?u.70978 β†’ Type ?u.70978
NatCast
(
Lex: Type ?u.70979 β†’ Type ?u.70979
Lex
Ξ±: Type ?u.70969
Ξ±
) :=
h: NatCast Ξ±
h
instance: {Ξ± : Type u_1} β†’ [h : AddMonoidWithOne Ξ±] β†’ AddMonoidWithOne (Lex Ξ±)
instance
[h :
AddMonoidWithOne: Type ?u.71019 β†’ Type ?u.71019
AddMonoidWithOne
Ξ±: Type ?u.71013
Ξ±
] :
AddMonoidWithOne: Type ?u.71022 β†’ Type ?u.71022
AddMonoidWithOne
(
Lex: Type ?u.71023 β†’ Type ?u.71023
Lex
Ξ±: Type ?u.71013
Ξ±
) := h
instance: {Ξ± : Type u_1} β†’ [h : AddCommMonoidWithOne Ξ±] β†’ AddCommMonoidWithOne (Lex Ξ±)
instance
[h :
AddCommMonoidWithOne: Type ?u.71063 β†’ Type ?u.71063
AddCommMonoidWithOne
Ξ±: Type ?u.71057
Ξ±
] :
AddCommMonoidWithOne: Type ?u.71066 β†’ Type ?u.71066
AddCommMonoidWithOne
(
Lex: Type ?u.71067 β†’ Type ?u.71067
Lex
Ξ±: Type ?u.71057
Ξ±
) := h @[simp] theorem
toLex_natCast: βˆ€ {Ξ± : Type u_1} [inst : NatCast Ξ±] (n : β„•), ↑toLex ↑n = ↑n
toLex_natCast
[
NatCast: Type ?u.71107 β†’ Type ?u.71107
NatCast
Ξ±: Type ?u.71101
Ξ±
] (n :
β„•: Type
β„•
) :
toLex: {Ξ± : Type ?u.71113} β†’ Ξ± ≃ Lex Ξ±
toLex
(n :
Ξ±: Type ?u.71101
Ξ±
) = n :=
rfl: βˆ€ {Ξ± : Sort ?u.71338} {a : Ξ±}, a = a
rfl
#align to_lex_nat_cast
toLex_natCast: βˆ€ {Ξ± : Type u_1} [inst : NatCast Ξ±] (n : β„•), ↑toLex ↑n = ↑n
toLex_natCast
@[simp] theorem
ofLex_natCast: βˆ€ {Ξ± : Type u_1} [inst : NatCast Ξ±] (n : β„•), ↑(↑ofLex n) = ↑n
ofLex_natCast
[
NatCast: Type ?u.71380 β†’ Type ?u.71380
NatCast
Ξ±: Type ?u.71374
Ξ±
] (n :
β„•: Type
β„•
) : (
ofLex: {Ξ± : Type ?u.71387} β†’ Lex Ξ± ≃ Ξ±
ofLex
n :
Ξ±: Type ?u.71374
Ξ±
) = n :=
rfl: βˆ€ {Ξ± : Sort ?u.71588} {a : Ξ±}, a = a
rfl
#align of_lex_nat_cast
ofLex_natCast: βˆ€ {Ξ± : Type u_1} [inst : NatCast Ξ±] (n : β„•), ↑(↑ofLex n) = ↑n
ofLex_natCast