summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-04-03fix compilation for Agda 2.3.0.1 againHelmut Grohne
It fails to infer the type of MaybeFunctor._<$>_, so give it explicitly.
2014-04-03Merge branch feature-shaped into masterHelmut Grohne
Generalizing both Vecs in the type of get to instances of Shaped. Thus allowing trees and other data structures to be used.
2014-04-03drop PartialShapeVecHelmut Grohne
One can use PartialShapeShape instead, so there is limited utility for this type. It is not used directly and there also is no PartialVecShape.
2014-03-10also allow Shaped types for the viewHelmut Grohne
Albeit long, this commit is relatively boring.
2014-03-10generalize lemma-{just-sequence,sequence-successful}Helmut Grohne
2014-03-10Example: show that PairVec is ShapedHelmut Grohne
Example inspired in VoigtlaenderHMW13. Note that Vec (α × β) (length s) is not Shaped in this way since its real index is only a number.
2014-03-10port precondition to PartialShapeVecHelmut Grohne
2014-03-10port theorem-{1,2} to PartialShapeVecHelmut Grohne
2014-03-10implement a bff on a shaped source typeHelmut Grohne
Add IsShaped and Shaped records describing shapely types as in Jay95. Implement bff on Shaped and rewrite PartialVecVec to use the vector shape retaining all proofs on the vector implementation.
2014-03-07add a Functor structureHelmut Grohne
The intent is to replace some uses of Vec with a structure that also happens to be a functor. RawFunctors from the standard library provide no laws though, so we define a Functor structure that adds the laws. As an additional law congruence is added, because * Other standard library structures in Algebra.Structures also require congruence. * Otherwise the identity law would have to reason about different identities.
2014-03-07improve notation of theorem-1 using local bindingsHelmut Grohne
2014-03-07use allFin rather than tabulate idHelmut Grohne
2014-03-05Merge branch feature-omit-sequence into masterHelmut Grohne
Beyond allowing default values during shape updates, this branch simplifies working with shapes other than Vec.
2014-03-04make lemma-sequenceV-successful more preciseHelmut Grohne
2014-02-26weaken assumptions made by theorem-2 and asssoc-enoughHelmut Grohne
2014-02-26remove the sequenceV call from bffHelmut Grohne
This allows bff to be more precise with regard to its failure modes, even though we are not yet making use of that projected precision. It allows inserting a default value for entries that could not be recovered in a shape changing update as described in VoigtlaenderHMW13.
2014-02-26fix compilation on Agda 2.3.0.1Helmut Grohne
2014-02-26convert LiftGet module to using heterogeneous equalityHelmut Grohne
The reduction in proof length is impressive.
2014-02-24add intersperse as another exampleHelmut Grohne
2014-02-24theorem-2 works with EqR rather than SetoidReasoning againHelmut Grohne
2014-02-24define fromFunc more convenientlyHelmut Grohne
2014-02-24generalize/weaken lemma-get-mapMVHelmut Grohne
It is now lemma-get-sequenceV and thus no longer applies the free theorem for the function. Apart making the proof shorter, it also makes the main use of the free theorem more visible in theorem-2.
2014-02-24define mapMV via sequenceVHelmut Grohne
This makes a few proofs easier and eliminates the need for sequence-map entirely.
2014-02-24generalize lemma-lookupM-assocHelmut Grohne
2014-02-21minor simplificationsHelmut Grohne
2014-02-21use map-Σ to simplify lemma-mapM-successfulHelmut Grohne
2014-02-17fix compilation on Agda 2.3.0.1Helmut Grohne
2014-02-17use drop, tail and take from Data.Vec in examplesHelmut Grohne
This is possible using the PartialVecVec implementation.
2014-02-17switch examples to PartialVecVecHelmut Grohne
2014-02-17Merge branch feature-partial-getlen into masterHelmut Grohne
It allows defining get functions that are only defined for some vector lengths. It retains backwards compatibility with the previous state via a VecVec compatibility module. The biggest benefit is that now standard library functions such as tail, take and drop can be passed to bff. Conflicts: heavy BFF.agda (imports, bff type clash) Bidir.agda (imports, heavy bff type clash in theorem-{1,2} and lemma-get-mapMV) Generic.agda (imports) Precond.agda (imports, bff type clash in assoc-enough)
2014-02-17avoid useless repetitionHelmut Grohne
2014-02-14Merge branch feature-shape-update into masterHelmut Grohne
The branch enables shape updates in variety of flavours: * explicitly passing the desired target shape * providing a plugin sput : ℕ → ℕ → Maybe ℕ * providing a right-inverse to getlen It also provides a backwards compatibility function to facilitate shape-retaining updates.
2014-02-14add back original bff function before shape updatesHelmut Grohne
2014-02-10add bffplug and bffinv functions and examplesHelmut Grohne
We can now exploit getlen being rightinvertible and it works for drop and sieve.
2014-02-10Merge branch master into feature-shape-updateHelmut Grohne
For building on the sieve example.
2014-02-10add sieve to examplesHelmut Grohne
2014-02-07eliminate useless withsHelmut Grohne
2014-02-07replace rewrite with cong where feasibleHelmut Grohne
2014-02-07allow shape shape updates in bffHelmut Grohne
Unlike the original version in VoigtlaenderHMW13, we do not request an sput : ℕ → ℕ → Maybe ℕ function for determining the updated source shape from the original source and updated view shape. Instead we ask the caller directly to provide the result of sput together with a proof that its getlen matches with the provided, updated view. The precondition assoc-enough is not enriched in this way and still requires a non-changing shape. I.e. it says what it said before.
2014-02-05be more precise about which lookups we useHelmut Grohne
2014-02-05strip even more implementation detail in PrecondHelmut Grohne
2014-02-05strip implementation detail from lemma-union-delete-fromFuncHelmut Grohne
2014-02-05add lemma-lookupM-fromFuncHelmut Grohne
The new lemma replaces two uses of lemma-fromFunc-tabulate, because the latter exposes the implementation of FinMapMaybe, whereas the former argues about the behaviour of FinMapMaybe. The aim of not exposing the implementation (apart from brevity) is to enable refactoring.
2014-02-05add examplesHelmut Grohne
2014-02-04remove unused importsHelmut Grohne
Most of the became unused by using the convenience functions introduced in the parent commit.
2014-02-04add convenience members to PartialVecVec.GetHelmut Grohne
2014-02-04Merge branch feature-get-record into feature-partial-getlenHelmut Grohne
These two features heavily interconnect. As such it makes sense to integrate them properly. This non-trivial merge does that work. Compared to feature-partial-getlen a few definitions moved from FreeTheorems.agda to GetTypes.agda. Many types changed compared to both branches. Conflicts: BFF.agda Bidir.agda FreeTheorems.agda Precond.agda conflict in GetTypes.agda not detected by merge
2014-02-03make things compile with 2.3.0.1Helmut Grohne
* Remove let patter , match = foo usage * Remove Qualified.infix-symbol usage * Add non-obvious absurd patterns * Qualify constructors
2014-02-03Merge branch feature-get-record into masterHelmut Grohne
This branch brings three main benefits: * Only one explicit parameter is needed to ask for a get function. * The postulated free theorems are mostly turned into preconditions, i.e. the only use of the postulates is in LiftGet. * We can now convert list based get functions to vec based ones and back including the (now) accompanying free theorem.
2014-02-03also show the other direction GetL-to-GetVHelmut Grohne