Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.
This repository was archived by the owner on May 27, 2025. It is now read-only.

Apartness propositions without equalities #11

@matthewhammer

Description

@matthewhammer

It'd be great to write functions like the one below without having to construct and pass the arguments X and Y, whose definitions are already known (and insisted upon) by the function itself:

    //
    // Allocate a ref cell, holding a cons cell, pointing at a list:
    //
    // ref         cons       ref     list
    // |{@!}X1|--->|X1|_|*|-->|Y1|--> |...[X2][Y2]...|
    //
    // : Ref[{@!}X1](List[X1%X2][Y1%Y2])
    //
    let ref_cons:(
        Thk[0]
            foralli (X,X1,X2):NmSet | ((X1%X2)=X:NmSet).
            foralli (Y,Y1,Y2):NmSet | ((Y1%Y2)=Y:NmSet).
            0 Nm[X1] ->
            0 Nat ->
            0 Ref[Y1](List[X2][Y2]) ->
            {{@!}X;0} F Ref[{@!}X1](List[X1%X2][Y1%Y2])
    ) = {            
        ret thunk #n.#h.#t. ref n
            roll inj2 pack (X1,X2,Y1,Y2) (n, h, t)
    }

I think doing so is only a matter of supporting apartness propositions directly, in addition to equality propositions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions