chore: upstream Divides class and syntax (#3283)
This just upstreams the class and notation. Instances will be provided with Nat/Int upstream
This commit is contained in:
parent
86d032ebf9
commit
adcec8e67a
2 changed files with 6 additions and 0 deletions
|
|
@ -268,6 +268,7 @@ syntax (name := rawNatLit) "nat_lit " num : term
|
|||
@[inherit_doc] infixr:90 " ∘ " => Function.comp
|
||||
@[inherit_doc] infixr:35 " × " => Prod
|
||||
|
||||
@[inherit_doc] infix:50 " ∣ " => Dvd.dvd
|
||||
@[inherit_doc] infixl:55 " ||| " => HOr.hOr
|
||||
@[inherit_doc] infixl:58 " ^^^ " => HXor.hXor
|
||||
@[inherit_doc] infixl:60 " &&& " => HAnd.hAnd
|
||||
|
|
|
|||
|
|
@ -1314,6 +1314,11 @@ class Mod (α : Type u) where
|
|||
/-- `a % b` computes the remainder upon dividing `a` by `b`. See `HMod`. -/
|
||||
mod : α → α → α
|
||||
|
||||
/-- Notation typeclass for the `∣` operation (typed as `\|`), which represents divisibility. -/
|
||||
class Dvd (α : Type _) where
|
||||
/-- Divisibility. `a ∣ b` (typed as `\|`) means that there is some `c` such that `b = a * c`. -/
|
||||
dvd : α → α → Prop
|
||||
|
||||
/--
|
||||
The homogeneous version of `HPow`: `a ^ b : α` where `a : α`, `b : β`.
|
||||
(The right argument is not the same as the left since we often want this even
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue