-
Notifications
You must be signed in to change notification settings - Fork 245
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
Match on _IsRelatedTo_ later for the PartialSetoid Reasoning #2677
base: master
Are you sure you want to change the base?
Conversation
I would personally find an example helpful here to illustrate the discussion. Specifically, to understand in your hypothetical first situation if, and then why, the following reasoning would not work instead: begin A ≈⟨ some-partial-equiv ⟩
B ≈⟨ reflexivity (some-complex-eq) ⟩
C ∎ It may be that some (other) plumbing may be required, such as observing that reflexivity holds in PERs at any Certainly, the library has no examples of reasoning in PERs that I'm aware of, so it probably hasn't been stress tested enough for the situations you sketch. |
@jamesmckinna Here is the list:
|
( I updated my posting to try to make clearer my intentions) |
@jamesmckinna The problem there is, |
@jamesmckinna One can prove something like
with
Now, to change |
@Ailrun thanks very much for the clarification, and sorry that my efforts last night weren't quite enough to make myself clear. What I had in mind was the following plumbing, for PER trans-reflˡ : ∀ {x y z} → x ≡ y → y ≈ z → x ≈ z
trans-reflˡ ≡.refl p = p
trans-reflʳ : ∀ {x y z} → x ≈ y → y ≡ z → x ≈ z -- by analogy with `Relation.Binary.PropositionalEquality.trans-reflʳ`
trans-reflʳ p ≡.refl = p
p-reflˡ : ∀ {x y} → x ≈ y → x ≈ x -- 'partial reflexivity on the left'
p-reflˡ p = trans p (sym p)
p-reflʳ : ∀ {x y} → x ≈ y → y ≈ y
p-reflʳ p = trans (sym p) p
p-reflexiveˡ : ∀ {x y z} → x ≈ y → x ≡ z → x ≈ z
p-reflexiveˡ p ≡.refl = p-reflˡ p
p-reflexiveʳ : ∀ {x y z} → x ≈ y → y ≡ z → y ≈ z
p-reflexiveʳ p ≡.refl = p-reflʳ p and then to replace your begin A ≈⟨ p ⟩
B ≡⟨ q ⟩
C ∎ by begin A ≈⟨ p ⟩
B ≈⟨ p-reflexiveʳ p q ⟩
C ∎ and the second example similarly (?). But your question does indeed draw attention to problems with the current setup! And that my suggestions are certainly not per se part of the current I've encountered something similar in the Does the solution in the current PR completely solve the problem, however? I'd be happier if we had did have such... |
To be honest, I don't think this PR's solution is really a complete solution. I intended to give a solution with a minimal impact in the sense that it does not "reduce" the reduction behavior. If we want a more complete solution, my guess is changing |
Thanks! It would be good for the implementor(s) of the original reasoning setup to comment here I think... @MatthewDaggitt ? |
I agree with your analysis. Changing |
@MatthewDaggitt Unfortunately not within a month. After a month I might have some more time. |
Main Motivation of This PR
The current version does not work in the following case, for example:
when
some-complex-eq
is not definitionally equal torefl
. Because of that,step
of the noncomputing syntax will not be evaluated, and in turn,∼-go
does not produce anymultiStep
constructor. This blocks the decision procedureIsMultiStep?
.One can make this work using
subst
, but more complex reasoning becomes very nasty with that.This PR makes the above example work.
Related Issue
One related, remaining issue is that the reversed case still does not work:
As
some-complex-eq
is not definitionally equal torefl
,step
of the noncomputing syntax will not be evaluated. Thus, like before,IsMultiStep?
cannot decide whether this reasoning contains multiple steps or not.