- sizeOf : ALaCarte.FunctorSizeOf SubF
- repr : ALaCarte.Representable SubF
- deq : ALaCarte.RepresentableDecidableEq SubF
- ord : ALaCarte.RepresentableOrd SubF
Instances
@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[instance_reducible]
@[irreducible]
Equations
Instances For
@[instance_reducible]
Equations
- DY.instSizeOfBytes = { sizeOf := fun (m : Subtype DY.ALaCarte.BareContainer.wf) => m._sizeOf_1 }
@[instance_reducible]
@[instance_reducible]
Equations
- DY.instOrdBytes = { compare := DY.ALaCarte.Container.compare }
@[instance_reducible]
Equations
class
DY.BytesFunctor.HasStep
(SubF1 : Type → Type)
(SubF2 : semiOutParam (Type → Type))
[SubBytesFunctor SubF1]
[semiOutParam (SubBytesFunctor SubF2)]
extends DY.ALaCarte.SubFunctor SubF1 SubF2 :
Type 1
- sizeOf_inj {a : Type} [SizeOf a] (x : SubF1 a) : FunctorSizeOf.sizeOf (inj x) = FunctorSizeOf.sizeOf x
Instances
class
DY.BytesFunctor.Has
[BytesFunctor]
(SubF : Type → Type)
[SubBytesFunctor SubF]
extends DY.ALaCarte.SubFunctorTC SubF DY.BytesF :
Type 1
- sizeOf_inj {a : Type} [SizeOf a] (x : SubF a) : FunctorSizeOf.sizeOf (inj x) = FunctorSizeOf.sizeOf x
Instances
@[instance_reducible]
Equations
- DY.BytesFunctor.instHasBytesF = { toSubFunctorTC := DY.ALaCarte.instSubFunctorTC DY.BytesF }
@[instance_reducible]
instance
DY.BytesFunctor.instHasOfHasStep
[BytesFunctor]
(SubF1 SubF2 : Type → Type)
[SubBytesFunctor SubF1]
[SubBytesFunctor SubF2]
[HasStep SubF1 SubF2]
[Has SubF2]
:
Has SubF1
Equations
- DY.BytesFunctor.instHasOfHasStep SubF1 SubF2 = { toSubFunctorTC := DY.ALaCarte.instSubFunctorTCOfSubFunctor }
@[reducible, inline]
Equations
- DY.BytesFunctor.combine SubFs = DY.ALaCarte.FunctorUnion SubFs
Instances For
@[instance_reducible]
instance
DY.instSubBytesFunctorCombineOfDecidableEqOfLawfulEqOrdOfTransOrd
{a : Type}
[DecidableEq a]
[Ord a]
[Std.LawfulEqOrd a]
[Std.TransOrd a]
(SubFs : a → Type → Type)
[(id : a) → SubBytesFunctor (SubFs id)]
:
SubBytesFunctor (BytesFunctor.combine SubFs)
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
instance
DY.instHasStepCombine
{a : Type}
[DecidableEq a]
[Ord a]
[Std.LawfulEqOrd a]
[Std.TransOrd a]
(SubFs : a → Type → Type)
[(id : a) → SubBytesFunctor (SubFs id)]
(id : a)
:
BytesFunctor.HasStep (SubFs id) (BytesFunctor.combine SubFs)
Equations
- DY.instHasStepCombine SubFs id = { toSubFunctor := DY.ALaCarte.instSubFunctorFunctorUnionOfDecidableEq SubFs id }
def
DY.Bytes.view?
[BytesFunctor]
(b : Bytes)
(SubF : Type → Type)
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
:
Equations
- b.view? SubF = DY.ALaCarte.Container.view SubF b
Instances For
def
DY.BytesView.pack
[BytesFunctor]
{SubF : Type → Type}
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
(b : BytesView SubF)
:
Equations
- b.pack = DY.ALaCarte.Container.pack SubF b
Instances For
theorem
DY.Bytes.pack_view?
[BytesFunctor]
(SubF : Type → Type)
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
(b : Bytes)
:
theorem
DY.BytesView.view_pack
[BytesFunctor]
{SubF : Type → Type}
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
(b : BytesView SubF)
:
theorem
DY.Bytes.sizeOf_view
[BytesFunctor]
(SubF : Type → Type)
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
(b : Bytes)
:
def
DY.Bytes.PartialFunction
[BytesFunctor]
(SubF : Type → Type)
[SubBytesFunctor SubF]
(a : Type)
:
Equations
- DY.Bytes.PartialFunction SubF a = ((x : SubF DY.Bytes) → ((y : DY.Bytes) → autoParam (sizeOf y ≤ DY.ALaCarte.FunctorSizeOf.sizeOf x) DY.Bytes.PartialFunction._auto_1 → a) → a)
Instances For
@[reducible, inline]
Equations
Instances For
Equations
- DY.Bytes.rec f x = DY.ALaCarte.Container.rec f x
Instances For
class
DY.Bytes.SubFunctionStep
[BytesFunctor]
{SubF1 SubF2 : Type → Type}
{a : Type}
[SubBytesFunctor SubF1]
[SubBytesFunctor SubF2]
[BytesFunctor.HasStep SubF1 SubF2]
(partialFun1 : PartialFunction SubF1 a)
(partialFun2 : semiOutParam (PartialFunction SubF2 a))
extends DY.ALaCarte.SubPartialFun partialFun1 partialFun2 :
- pf (x : SubF1 (ContainerFor BytesF)) (rec : (y : ContainerFor BytesF) → sizeOf y ≤ FunctorSizeOf.sizeOf x → a) : partialFun1 x rec = partialFun2 (SubFunctor.inj x) fun (y : ContainerFor BytesF) (h : sizeOf y ≤ FunctorSizeOf.sizeOf (SubFunctor.inj x)) => rec y ⋯
Instances
class
DY.Bytes.SubFunction
[BytesFunctor]
{SubF : Type → Type}
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
{a : Type}
(partialFun : PartialFunction SubF a)
(totalFun : Function a)
extends DY.ALaCarte.SubPartialFunTC partialFun totalFun :
- pf (x : SubF (ContainerFor BytesF)) (rec : (y : ContainerFor BytesF) → sizeOf y ≤ FunctorSizeOf.sizeOf x → a) : partialFun x rec = totalFun (SubFunctorTC.inj x) fun (y : ContainerFor BytesF) (h : sizeOf y ≤ FunctorSizeOf.sizeOf (SubFunctorTC.inj x)) => rec y ⋯
Instances
instance
DY.instSubFunctionBytesF
[BytesFunctor]
{a : Type}
(totalFun : Bytes.Function a)
:
Bytes.SubFunction totalFun totalFun
instance
DY.instSubFunctionOfSubFunctionStep
[BytesFunctor]
{SubF1 SubF2 : Type → Type}
[SubBytesFunctor SubF1]
[SubBytesFunctor SubF2]
[BytesFunctor.HasStep SubF1 SubF2]
[BytesFunctor.Has SubF2]
{a : Type}
(partialFun1 : Bytes.PartialFunction SubF1 a)
(partialFun2 : Bytes.PartialFunction SubF2 a)
(totalFun : Bytes.Function a)
[Bytes.SubFunctionStep partialFun1 partialFun2]
[Bytes.SubFunction partialFun2 totalFun]
:
Bytes.SubFunction partialFun1 totalFun
def
DY.Bytes.PartialFunction.combine
[BytesFunctor]
{t : Type}
[DecidableEq t]
[Ord t]
[Std.LawfulEqOrd t]
[Std.TransOrd t]
{SubFs : t → Type → Type}
[(id : t) → SubBytesFunctor (SubFs id)]
{a : Type}
(funs : (id : t) → PartialFunction (SubFs id) a)
:
PartialFunction (BytesFunctor.combine SubFs) a
Equations
Instances For
instance
DY.instSubFunctionStepCombineCombine
[BytesFunctor]
{t : Type}
[DecidableEq t]
[Ord t]
[Std.LawfulEqOrd t]
[Std.TransOrd t]
{SubFs : t → Type → Type}
[(id : t) → SubBytesFunctor (SubFs id)]
{a : Type}
(funs : (id : t) → Bytes.PartialFunction (SubFs id) a)
(id : t)
:
Bytes.SubFunctionStep (funs id) (Bytes.PartialFunction.combine funs)
theorem
DY.Bytes.rec_eq
[BytesFunctor]
{SubF : Type → Type}
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
{a : Type}
(partialFun : PartialFunction SubF a)
(totalFun : Function a)
[SubFunction partialFun totalFun]
(x : BytesView SubF)
:
def
DY.Bytes.PartialProof1
[BytesFunctor]
{SubF : Type → Type}
[SubBytesFunctor SubF]
{a : Type}
(fn : PartialFunction SubF a)
(rec : Bytes → a)
(p : a → Prop)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- DY.Bytes.Proof1 fn p = DY.Bytes.PartialProof1 fn (DY.Bytes.rec fn) p
Instances For
theorem
DY.Bytes.Proof1.prove
[BytesFunctor]
{a : Type}
{fn : Function a}
{p : a → Prop}
(pf : Proof1 fn p)
(x : Bytes)
:
p (rec fn x)
theorem
DY.Bytes.PartialProof1.combine
[BytesFunctor]
{t : Type}
[DecidableEq t]
[Ord t]
[Std.LawfulEqOrd t]
[Std.TransOrd t]
{SubFs : t → Type → Type}
[(id : t) → SubBytesFunctor (SubFs id)]
{a : Type}
{funs : (id : t) → PartialFunction (SubFs id) a}
{rec : Bytes → a}
{p : a → Prop}
(pfs : ∀ (id : t), PartialProof1 (funs id) rec p)
:
PartialProof1 (PartialFunction.combine funs) rec p
def
DY.Bytes.PartialProof2
[BytesFunctor]
{SubF : Type → Type}
[SubBytesFunctor SubF]
{a b : Type}
(fn1 : PartialFunction SubF a)
(fn2 : PartialFunction SubF b)
(rec1 : Bytes → a)
(rec2 : Bytes → b)
(p : a × b → Prop)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
DY.Bytes.Proof2
[BytesFunctor]
{a b : Type}
(fn1 : Function a)
(fn2 : Function b)
(p : a × b → Prop)
:
Equations
- DY.Bytes.Proof2 fn1 fn2 p = DY.Bytes.PartialProof2 fn1 fn2 (DY.Bytes.rec fn1) (DY.Bytes.rec fn2) p
Instances For
theorem
DY.Bytes.PartialProof2.combine
[BytesFunctor]
{t : Type}
[DecidableEq t]
[Ord t]
[Std.LawfulEqOrd t]
[Std.TransOrd t]
{SubFs : t → Type → Type}
[(id : t) → SubBytesFunctor (SubFs id)]
{a b : Type}
{funs1 : (id : t) → PartialFunction (SubFs id) a}
{funs2 : (id : t) → PartialFunction (SubFs id) b}
{rec1 : Bytes → a}
{rec2 : Bytes → b}
{p : a × b → Prop}
(pfs : ∀ (id : t), PartialProof2 (funs1 id) (funs2 id) rec1 rec2 p)
:
PartialProof2 (PartialFunction.combine funs1) (PartialFunction.combine funs2) rec1 rec2 p
Equations
Instances For
@[reducible, inline]
Equations
- DY.Bytes.PartialLength SubF = DY.Bytes.PartialFunction SubF Nat
Instances For
class
DY.BytesLength.HasStep
[BytesFunctor]
{SubF1 SubF2 : Type → Type}
[SubBytesFunctor SubF1]
[SubBytesFunctor SubF2]
[BytesFunctor.HasStep SubF1 SubF2]
(partialLength1 : outParam (Bytes.PartialLength SubF1))
(partialLength2 : Bytes.PartialLength SubF2)
extends DY.Bytes.SubFunctionStep partialLength1 partialLength2 :
- pf (x : SubF1 (ContainerFor BytesF)) (rec : (y : ContainerFor BytesF) → sizeOf y ≤ FunctorSizeOf.sizeOf x → Nat) : partialLength1 x rec = partialLength2 (SubFunctor.inj x) fun (y : ContainerFor BytesF) (h : sizeOf y ≤ FunctorSizeOf.sizeOf (SubFunctor.inj x)) => rec y ⋯
Instances
class
DY.BytesLength.Has
[BytesFunctor]
[BytesLength]
{SubF : Type → Type}
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
(binv : outParam (Bytes.PartialLength SubF))
extends DY.Bytes.SubFunction binv DY.BytesLength.funs :
- pf (x : SubF (ContainerFor BytesF)) (rec : (y : ContainerFor BytesF) → sizeOf y ≤ FunctorSizeOf.sizeOf x → Nat) : binv x rec = BytesLength.funs (SubFunctorTC.inj x) fun (y : ContainerFor BytesF) (h : sizeOf y ≤ FunctorSizeOf.sizeOf (SubFunctorTC.inj x)) => rec y ⋯
Instances
@[reducible, inline]
abbrev
DY.Bytes.PartialLength.combine
[BytesFunctor]
{t : Type}
[DecidableEq t]
[Ord t]
[Std.LawfulEqOrd t]
[Std.TransOrd t]
{SubFs : t → Type → Type}
[(id : t) → SubBytesFunctor (SubFs id)]
(lens : (id : t) → PartialLength (SubFs id))
:
PartialLength (BytesFunctor.combine SubFs)
Equations
Instances For
instance
DY.BytesLength.instHasOfHasStep
[BytesFunctor]
[BytesLength]
{SubF1 SubF2 : Type → Type}
[SubBytesFunctor SubF1]
[SubBytesFunctor SubF2]
[BytesFunctor.HasStep SubF1 SubF2]
[BytesFunctor.Has SubF2]
(partialLen1 : Bytes.PartialLength SubF1)
(partialLen2 : Bytes.PartialLength SubF2)
[inst1 : HasStep partialLen1 partialLen2]
[inst2 : Has partialLen2]
:
Has partialLen1
instance
DY.BytesLength.instHasStepCombineCombine
[BytesFunctor]
{t : Type}
[DecidableEq t]
[Ord t]
[Std.LawfulEqOrd t]
[Std.TransOrd t]
(SubFs : t → Type → Type)
[(id : t) → SubBytesFunctor (SubFs id)]
(invs : (id : t) → Bytes.PartialLength (SubFs id))
(id : t)
:
HasStep (invs id) (Bytes.PartialLength.combine invs)
@[simp]
theorem
DY.Bytes.length.eq
[BytesFunctor]
{SubF : Type → Type}
[SubBytesFunctor SubF]
[BytesFunctor.Has SubF]
[BytesLength]
{subLength : PartialLength SubF}
[tc : BytesLength.Has subLength]
(b : BytesView SubF)
: