TraversalArrayRefinement.fold_step_refines_model: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/traversal_array_refinement.bend as TraversalArrayRefinement Lines 99-116 of stelliferous@0.0.2.0/proofs/traversal_array_refinement.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/traversal_array_refinement.bend&start_line=99&end_line=116 import Base import stelliferous@0.0.2.0/traversal_array.bend as Traversal def fold_step_refines_model(~Reader: Type,~Model: Data,~Element: Data,~Accumulator: Data,~Context: Data, ~pack_reader: Model -> Reader,~read: Reader -> Context -> U32 -> Reader & Element, ~sample: Model -> Context -> U32 -> Element,~combine: Accumulator -> Element -> Accumulator, ~read_matches: @+reader: Model -> @+context: Context -> @+position: U32 -> {read(pack_reader(reader),context,position) == (pack_reader(reader),sample(reader,context,position)) : Reader & Element}, +state: Traversal.State<&2,&2,Model,Accumulator,Context>) -> {Traversal.fold_step(~Reader,~Element,~Accumulator,~Context,~read,~combine, represent_fold(~Reader,~Model,~Accumulator,~Context,~pack_reader,state)) == represent_fold(~Reader,~Model,~Accumulator,~Context,~pack_reader, model_fold_step(~Model,~Element,~Accumulator,~Context,~sample,~combine,state)) : Traversal.State<&1,&2,Reader,Accumulator,Context>}: Traversal.State{+reader,+accumulator,+position,+context} = state %Equal.sym(Reader & Element,read(pack_reader(reader),context,position),(pack_reader(reader),sample(reader,context,position)), read_matches(reader,context,position)) : {Traversal.fold_value(~Reader,~Element,~Accumulator,~Context,~combine,accumulator,position,context,_) == represent_fold(~Reader,~Model,~Accumulator,~Context,~pack_reader, model_fold_step(~Model,~Element,~Accumulator,~Context,~sample,~combine,Traversal.State{reader,accumulator,position,context})) : Traversal.State<&1,&2,Reader,Accumulator,Context>} {==} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/traversal_array_refinement.bend&name=model_fold_step https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/traversal_array_refinement.bend&name=represent_fold https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_array.bend&name=State https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_array.bend&name=fold_step https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_array.bend&name=fold_value