Skip to content

Strict order equational reasoning #1203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2025

Conversation

LorenzoMolena
Copy link
Contributor

@LorenzoMolena LorenzoMolena commented Apr 18, 2025

Facilities for equational reasoning involving mixed use of <, , in a type that is both a quoset and a poset (with the additional data of <-≤-trans, ≤-<-trans ) to obtain a strict inequality (having at least a < in the chain).
This is inspired from Relation.Binary.Reasoning.PartialOrder of the Agda Standard Library.

Some notes:

  • Compatibility with the existing equational reasoning already present in Prelude can be achieved with a nested chain of equations, as shown in the commented example.
    Such a chain can be written without nested equations, but it is not recomended, since it will perform a bunch of substs, and the combinators from Prelude (such as _ ≡[ i ]⟨ p i ⟩ _ ) cannot be used.
  • begin is needed at the start of the chain, since it has to extract a strict inequality from the given chain.
  • It should be easy to expand the code to also extract nonstrict inequalities, in that case a < won't be required in the chain.

LorenzoMolena and others added 2 commits April 18, 2025 17:16
Co-authored-by: Ettore Forigo <ettore.forigo@gmail.com>
@felixwellen felixwellen merged commit 2738401 into agda:master May 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants