Idris2Doc : Data.Nat

Data.Nat

Reexports

importpublic Control.Relation
importpublic Control.Ord
importpublic Control.Order
importpublic Control.Function

Definitions

isZero : Nat->Bool
Totality: total
Visibility: public export
isSucc : Nat->Bool
Totality: total
Visibility: public export
dataIsSucc : Nat->Type
Totality: total
Visibility: public export
Constructor: 
ItIsSucc : IsSucc (Sn)

Hint: 
Uninhabited (IsSucc0)
isItSucc : (n : Nat) ->Dec (IsSuccn)
Totality: total
Visibility: public export
power : Nat->Nat->Nat
Totality: total
Visibility: public export
hyper : Nat->Nat->Nat->Nat
Totality: total
Visibility: public export
pred : Nat->Nat
Totality: total
Visibility: public export
compareNatDiag : (k : Nat) ->compareNatkk=EQ
Totality: total
Visibility: export
compareNatFlip : (m : Nat) -> (n : Nat) ->flipcompareNatmn=contra (compareNatmn)
Totality: total
Visibility: export
dataNotBothZero : Nat->Nat->Type
Totality: total
Visibility: public export
Constructors:
LeftIsNotZero : NotBothZero (Sn) m
RightIsNotZero : NotBothZeron (Sm)

Hint: 
Uninhabited (NotBothZero00)
dataLTE : Nat->Nat->Type
Totality: total
Visibility: public export
Constructors:
LTEZero : LTE0right
LTESucc : LTEleftright->LTE (Sleft) (Sright)

Hints:
AntisymmetricNatLTE
ConnexNatLTE
LinearOrderNatLTE
PartialOrderNatLTE
PreorderNatLTE
ReflexiveNatLTE
TransitiveNatLTE
Uninhabited (LTE (Sn) 0)
Uninhabited (LTEmn) =>Uninhabited (LTE (Sm) (Sn))
GTE : Nat->Nat->Type
Totality: total
Visibility: public export
LT : Nat->Nat->Type
Totality: total
Visibility: public export
dataView : LTmn->Type
  LT is defined in terms of LTE which makes it annoying to use.
This convenient view of allows us to avoid having to constantly
perform nested matches to obtain another LT subproof instead of
an LTE one.

Totality: total
Visibility: public export
Constructors:
LTZero : View (LTESuccLTEZero)
LTSucc : (lt : LTmn) ->View (LTESucclt)
view : (lt : LTmn) ->Viewlt
  Deconstruct an LT proof into either a base case or a further *LT*

Totality: total
Visibility: export
ltZero : LT0 (Sm)
  A convenient alias for trivial LT proofs

Totality: total
Visibility: export
GT : Nat->Nat->Type
Totality: total
Visibility: public export
succNotLTEzero : Not (LTE (Sm) 0)
Totality: total
Visibility: export
fromLteSucc : LTE (Sm) (Sn) ->LTEmn
Totality: total
Visibility: export
succNotLTEpred : Not (LTE (Sx) x)
Totality: total
Visibility: export
isLTE : (m : Nat) -> (n : Nat) ->Dec (LTEmn)
Totality: total
Visibility: public export
isGTE : (m : Nat) -> (n : Nat) ->Dec (GTEmn)
Totality: total
Visibility: public export
isLT : (m : Nat) -> (n : Nat) ->Dec (LTmn)
Totality: total
Visibility: public export
isGT : (m : Nat) -> (n : Nat) ->Dec (GTmn)
Totality: total
Visibility: public export
lteSuccRight : LTEnm->LTEn (Sm)
Totality: total
Visibility: export
lteSuccLeft : LTE (Sn) m->LTEnm
Totality: total
Visibility: export
lteAddRight : (n : Nat) ->LTEn (n+m)
Totality: total
Visibility: export
notLTEImpliesGT : Not (LTEab) ->GTab
Totality: total
Visibility: export
LTEImpliesNotGT : LTEab->Not (GTab)
Totality: total
Visibility: export
notLTImpliesGTE : Not (LTab) ->GTEab
Totality: total
Visibility: export
LTImpliesNotGTE : LTab->Not (GTEab)
Totality: total
Visibility: export
lte : Nat->Nat->Bool
Totality: total
Visibility: public export
gte : Nat->Nat->Bool
Totality: total
Visibility: public export
lt : Nat->Nat->Bool
Totality: total
Visibility: public export
gt : Nat->Nat->Bool
Totality: total
Visibility: public export
lteReflectsLTE : (k : Nat) -> (n : Nat) ->ltekn=True->LTEkn
Totality: total
Visibility: export
gteReflectsGTE : (k : Nat) -> (n : Nat) ->gtekn=True->GTEkn
Totality: total
Visibility: export
ltReflectsLT : (k : Nat) -> (n : Nat) ->ltkn=True->LTkn
Totality: total
Visibility: export
ltOpReflectsLT : (m : Nat) -> (n : Nat) ->So (m<n) ->LTmn
Totality: total
Visibility: public export
gtReflectsGT : (k : Nat) -> (n : Nat) ->gtkn=True->GTkn
Totality: total
Visibility: export
minimum : Nat->Nat->Nat
Totality: total
Visibility: public export
maximum : Nat->Nat->Nat
Totality: total
Visibility: public export
eqSucc : (0left : Nat) -> (0right : Nat) ->left=right->Sleft=Sright
Totality: total
Visibility: export
dataNonZero : Nat->Type
  A definition of non-zero with a better behaviour than `Not (x = Z)`
This is amenable to proof search and `NonZero Z` is more readily
detected as impossible by Idris

Totality: total
Visibility: public export
Constructor: 
SIsNonZero : NonZero (Sx)

Hint: 
Uninhabited (NonZero0)
SIsNotZ : Not (Sx=0)
Totality: total
Visibility: export
mod' : Nat->Nat->Nat->Nat
  Auxiliary function:
mod' fuel a b = a `mod` (S b)
assuming we have enough fuel

Totality: total
Visibility: public export
modNatNZ : Nat-> (y : Nat) -> (0_ : NonZeroy) ->Nat
Totality: total
Visibility: public export
modNat : Nat->Nat->Nat
Visibility: export
div' : Nat->Nat->Nat->Nat
  Auxiliary function:
div' fuel a b = a `div` (S b)
assuming we have enough fuel

Totality: total
Visibility: public export
divNatNZ : Nat-> (y : Nat) -> (0_ : NonZeroy) ->Nat
Totality: total
Visibility: public export
divNat : Nat->Nat->Nat
Visibility: export
divCeilNZ : Nat-> (y : Nat) -> (0_ : NonZeroy) ->Nat
Visibility: export
divCeil : Nat->Nat->Nat
Visibility: export
divmod' : Nat->Nat->Nat-> (Nat, Nat)
Totality: total
Visibility: public export
divmodNatNZ : Nat-> (y : Nat) -> (0_ : NonZeroy) -> (Nat, Nat)
Totality: total
Visibility: public export
gcd : (a : Nat) -> (b : Nat) -> {auto0_ : NotBothZeroab} ->Nat
Visibility: export
lcm : Nat->Nat->Nat
Visibility: export
dataCmpNat : Nat->Nat->Type
Totality: total
Visibility: public export
Constructors:
CmpLT : (y : Nat) ->CmpNatx (x+Sy)
CmpEQ : CmpNatxx
CmpGT : (x : Nat) ->CmpNat (y+Sx) y
cmp : (x : Nat) -> (y : Nat) ->CmpNatxy
Totality: total
Visibility: export
plusZeroLeftNeutral : (right : Nat) ->0+right=right
Totality: total
Visibility: export
plusZeroRightNeutral : (left : Nat) ->left+0=left
Totality: total
Visibility: export
plusSuccRightSucc : (left : Nat) -> (right : Nat) ->S (left+right) =left+Sright
Totality: total
Visibility: export
plusCommutative : (left : Nat) -> (right : Nat) ->left+right=right+left
Totality: total
Visibility: export
plusAssociative : (left : Nat) -> (centre : Nat) -> (right : Nat) ->left+ (centre+right) = (left+centre) +right
Totality: total
Visibility: export
plusConstantRight : (left : Nat) -> (right : Nat) -> (c : Nat) ->left=right->left+c=right+c
Totality: total
Visibility: export
plusConstantLeft : (left : Nat) -> (right : Nat) -> (c : Nat) ->left=right->c+left=c+right
Totality: total
Visibility: export
plusOneSucc : (right : Nat) ->1+right=Sright
Totality: total
Visibility: export
plusLeftCancel : (left : Nat) -> (right : Nat) -> (right' : Nat) ->left+right=left+right'->right=right'
Totality: total
Visibility: export
plusRightCancel : (left : Nat) -> (left' : Nat) -> (right : Nat) ->left+right=left'+right->left=left'
Totality: total
Visibility: export
plusLeftLeftRightZero : (left : Nat) -> (right : Nat) ->left+right=left->right=0
Totality: total
Visibility: export
plusLteMonotoneRight : (p : Nat) -> (q : Nat) -> (r : Nat) ->LTEqr->LTE (q+p) (r+p)
Totality: total
Visibility: export
plusLteMonotoneLeft : (p : Nat) -> (q : Nat) -> (r : Nat) ->LTEqr->LTE (p+q) (p+r)
Totality: total
Visibility: export
plusLteMonotone : LTEmn->LTEpq->LTE (m+p) (n+q)
Totality: total
Visibility: export
multZeroLeftZero : (right : Nat) ->0*right=0
Totality: total
Visibility: export
multZeroRightZero : (left : Nat) ->left*0=0
Totality: total
Visibility: export
multRightSuccPlus : (left : Nat) -> (right : Nat) ->left*Sright=left+ (left*right)
Totality: total
Visibility: export
multLeftSuccPlus : (left : Nat) -> (right : Nat) ->Sleft*right=right+ (left*right)
Totality: total
Visibility: export
multCommutative : (left : Nat) -> (right : Nat) ->left*right=right*left
Totality: total
Visibility: export
multDistributesOverPlusLeft : (left : Nat) -> (centre : Nat) -> (right : Nat) -> (left+centre) *right= (left*right) + (centre*right)
Totality: total
Visibility: export
multDistributesOverPlusRight : (left : Nat) -> (centre : Nat) -> (right : Nat) ->left* (centre+right) = (left*centre) + (left*right)
Totality: total
Visibility: export
multAssociative : (left : Nat) -> (centre : Nat) -> (right : Nat) ->left* (centre*right) = (left*centre) *right
Totality: total
Visibility: export
multOneLeftNeutral : (right : Nat) ->1*right=right
Totality: total
Visibility: export
multOneRightNeutral : (left : Nat) ->left*1=left
Totality: total
Visibility: export
minusSuccSucc : (left : Nat) -> (right : Nat) ->minus (Sleft) (Sright) =minusleftright
Totality: total
Visibility: export
minusZeroLeft : (right : Nat) ->minus0right=0
Totality: total
Visibility: export
minusZeroRight : (left : Nat) ->minusleft0=left
Totality: total
Visibility: export
minusZeroN : (n : Nat) ->0=minusnn
Totality: total
Visibility: export
minusOneSuccN : (n : Nat) ->1=minus (Sn) n
Totality: total
Visibility: export
minusSuccOne : (n : Nat) ->minus (Sn) 1=n
Totality: total
Visibility: export
minusPlusZero : (n : Nat) -> (m : Nat) ->minusn (n+m) =0
Totality: total
Visibility: export
minusPos : LTmn->LT0 (minusnm)
Totality: total
Visibility: export
minusLteMonotone : LTEmn->LTE (minusmp) (minusnp)
Totality: total
Visibility: export
minusLtMonotone : LTmn->LTpn->LT (minusmp) (minusnp)
Totality: total
Visibility: export
minusPlus : (m : Nat) ->minus (plusmn) m=n
Totality: total
Visibility: public export
plusMinusLte : (n : Nat) -> (m : Nat) ->LTEnm->minusmn+n=m
Totality: total
Visibility: export
minusMinusMinusPlus : (left : Nat) -> (centre : Nat) -> (right : Nat) ->minus (minusleftcentre) right=minusleft (centre+right)
Totality: total
Visibility: export
plusMinusLeftCancel : (left : Nat) -> (right : Nat) -> (right' : Nat) ->minus (left+right) (left+right') =minusrightright'
Totality: total
Visibility: export
multDistributesOverMinusLeft : (left : Nat) -> (centre : Nat) -> (right : Nat) ->minusleftcentre*right=minus (left*right) (centre*right)
Totality: total
Visibility: export
multDistributesOverMinusRight : (left : Nat) -> (centre : Nat) -> (right : Nat) ->left*minuscentreright=minus (left*centre) (left*right)
Totality: total
Visibility: export
zeroMultEitherZero : (a : Nat) -> (b : Nat) ->a*b=0->Either (a=0) (b=0)
Totality: total
Visibility: export
maximumAssociative : (l : Nat) -> (c : Nat) -> (r : Nat) ->maximuml (maximumcr) =maximum (maximumlc) r
Totality: total
Visibility: export
maximumCommutative : (l : Nat) -> (r : Nat) ->maximumlr=maximumrl
Totality: total
Visibility: export
maximumIdempotent : (n : Nat) ->maximumnn=n
Totality: total
Visibility: export
maximumLeftUpperBound : (m : Nat) -> (n : Nat) ->LTEm (maximummn)
Totality: total
Visibility: export
maximumRightUpperBound : (m : Nat) -> (n : Nat) ->LTEn (maximummn)
Totality: total
Visibility: export
minimumAssociative : (l : Nat) -> (c : Nat) -> (r : Nat) ->minimuml (minimumcr) =minimum (minimumlc) r
Totality: total
Visibility: export
minimumCommutative : (l : Nat) -> (r : Nat) ->minimumlr=minimumrl
Totality: total
Visibility: export
minimumIdempotent : (n : Nat) ->minimumnn=n
Totality: total
Visibility: export
minimumZeroZeroLeft : (left : Nat) ->minimumleft0=0
Totality: total
Visibility: export
minimumSuccSucc : (left : Nat) -> (right : Nat) ->minimum (Sleft) (Sright) =S (minimumleftright)
Totality: total
Visibility: export
maximumZeroNLeft : (left : Nat) ->maximumleft0=left
Totality: total
Visibility: export
maximumSuccSucc : (left : Nat) -> (right : Nat) ->S (maximumleftright) =maximum (Sleft) (Sright)
Totality: total
Visibility: export
sucMaxL : (l : Nat) ->maximum (Sl) l=Sl
Totality: total
Visibility: export
sucMaxR : (l : Nat) ->maximuml (Sl) =Sl
Totality: total
Visibility: export
sucMinL : (l : Nat) ->minimum (Sl) l=l
Totality: total
Visibility: export
sucMinR : (l : Nat) ->minimuml (Sl) =l
Totality: total
Visibility: export