-
Notifications
You must be signed in to change notification settings - Fork 5
Unification #48
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
Unification #48
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
ed4c5e1
telescopic equality
EwenBC 89b361f
equivalence
EwenBC 968ecbf
notations telescope
EwenBC 4cb28e5
solutionL
EwenBC 4ab5d8b
fix haskel
EwenBC b101cde
cut
EwenBC cfcbf44
SoltionL with cut
EwenBC 804fae5
Cleaning code
EwenBC a0bb213
Shrink
EwenBC 4eaa7f2
Change definition of telescopic equality
EwenBC 3f3e6ed
addTel
EwenBC b8de7ec
Deletion and Injectivity
EwenBC 1fbf524
cleaning code
EwenBC aff2a03
Dependant Injectivity
EwenBC 08dbe00
Conflict rule
EwenBC 7156c9e
Changes in Scope library and commented work in progress
EwenBC 5a8d716
fix haskell (partial)
EwenBC f6fc03c
bump scopes version
liesnikov ba39089
bump scope version again
liesnikov 370a3a2
switch to Index instead of In
liesnikov f04a518
swap variables in a context
EwenBC 9981d9c
Termination of swap function
EwenBC 4cc6c3f
code compartimentation in modules
EwenBC a6b8429
code cleaning
EwenBC c112cb0
Renaming to Subst
EwenBC be42b7d
SwapHighest with Renaming
EwenBC 0112e50
swap using renaming
EwenBC e606073
swapVarList temporary and unsafe version
EwenBC 2e9a73d
unsafe swapVarTerm
EwenBC 169f2b2
unsafe swapVarTermStrengthened
EwenBC ed44547
code cleaning, replacing TCM by Maybe in swap and making swapVarTerm …
EwenBC 490b0a0
removing cases on TCM
EwenBC 06ee122
fuel for swapHighest and a context to try make test
EwenBC f0a42b4
Tests for swap highest and minor edits
EwenBC e5d5bdc
depandencies edit
EwenBC af9dc50
clean commented code
EwenBC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| use flake | ||
| use flake . -Lv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| Notations used in Agda Core (updated on 24/11/2025) | ||
|
|
||
| --------------------------------------------------------------------------------------------------- | ||
| symbols input via agda latex | ||
| ≡ == \equiv | ||
| ⊢ |- \vdash | ||
| ˢ ^s ^s | ||
| ∶ : \vdotdot | ||
| ◃ tw \smalltriangleleft | ||
| ∈ in \in | ||
| ⊆ sub= \subseteq | ||
| ⋈ join \bowtie | ||
| ⇒ => \Rightarrow | ||
| ⌈ cuL \lceil | ||
| ⌉ cuR \rceil | ||
| ↦ r-| \mapsto | ||
| ≟ ?= | ||
| ↣ r-> \rightarrowtail | ||
| ᵤ _u _u | ||
| --------------------------------------------------------------------------------------------------- | ||
|
|
||
| For Scopes : | ||
| α <> β α <> β Concatenation of scope α at the end of scope β | ||
| ~ α revScope α scope α reversed | ||
| α ⊆ β Sub α β α is a sub-scope of β | ||
| [ x ] singleton x Scope of one element x | ||
| x ∈ α In x α singleton x ⊆ α | ||
| x ◃ α bind x α Adds element x to scope α | ||
| α ⋈ β ≡ γ Split α β γ scope γ is a mix of elements of α and β | ||
|
|
||
| For context | ||
| Γ , x ∶ t CtxExtend Γ x t extension of context Γ where x is of type t (a type) | ||
|
|
||
| For substitution and telescope : | ||
| α ⇒ β Subst α β substitution from α to β | ||
| ⌈⌉ SNil/EmptyTel empty substitution/telescope | ||
| ⌈ x ↦ u ◃ σ ⌉ SCons {x = x} u σ extension of substitution σ where x is changed to u (a term) | ||
| ⌈ x ∶ t ◃ Δ ⌉ ExtendTel x t Δ extension of telescope Δ where x is of type t (a type) | ||
| δ₁ ≟ δ₂ ∶ Δ TelEq δ₁ δ₂ Δ telescopic equality between the scopes δ₁ = δ₂ of type Δ | ||
|
|
||
| For types : | ||
| Γ ⊢ u ∶ t TyTerm Γ u t In context Γ, u (a term) is of type t (a type) | ||
| Γ ⊢ˢ δ ∶ Δ TySubst Γ δ Δ In context Γ, δ (a substitution) is of type Δ (a telescope) | ||
|
|
||
| Unification : | ||
| Γ , ΔEq ↣ᵤ Γ' , ΔEq' UnificationStep Γ ΔEq Γ' ΔEq' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| open import Haskell.Prelude | ||
| open import Haskell.Extra.Erase | ||
| open import Haskell.Law.Equality | ||
|
|
||
| open import Scope | ||
|
|
||
|
|
||
| open import Agda.Core.Name | ||
|
|
||
| module Agda.Core.ScopeUtils where | ||
|
|
||
| module Shrink where | ||
| private variable | ||
| @0 α β : Scope Name | ||
| x : Name | ||
|
|
||
| data Shrink : (@0 α β : Scope Name) → Set where | ||
| ShNil : Shrink mempty β | ||
| ShKeep : (@0 x : Name) → Shrink α β → Shrink (x ◃ α) (x ◃ β) | ||
| ShCons : (@0 x : Name) → Shrink α β → Shrink α (x ◃ β) | ||
|
|
||
| opaque | ||
| unfolding Scope | ||
| idShrink : Rezz α → Shrink α α | ||
| idShrink (rezz []) = ShNil | ||
| idShrink (rezz (Erased x ∷ α)) = ShKeep x (idShrink (rezz α)) | ||
|
|
||
| ShrinkToSub : Shrink α β → α ⊆ β | ||
| ShrinkToSub ShNil = subEmpty | ||
| ShrinkToSub (ShKeep x s) = subBindKeep (ShrinkToSub s) | ||
| ShrinkToSub (ShCons x s) = subBindDrop (ShrinkToSub s) | ||
|
|
||
| opaque | ||
| unfolding Sub Split | ||
| SubToShrink : Rezz β → α ⊆ β → Shrink α β | ||
| SubToShrink _ (⟨ γ ⟩ EmptyL) = ShNil | ||
| SubToShrink βRun (⟨ γ ⟩ EmptyR) = idShrink βRun | ||
| SubToShrink βRun (⟨ γ ⟩ ConsL x p) = ShKeep x (SubToShrink (rezzUnbind βRun) < p >) | ||
| SubToShrink βRun (⟨ γ ⟩ ConsR y p) = ShCons y (SubToShrink (rezzUnbind βRun) < p >) | ||
| {- End of module Shrink -} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My personal taste here would be to omit the
⌈and⌉in the⌈_∶_◃_⌉syntax. You can always put regular parenthesis where desired.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to change this notation in the pull request that I started yesterday ? (As doing so here will create a conflict between the two pull request.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's fine with me.