Skip to content
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

Recomputable #762

Merged
merged 7 commits into from
May 15, 2019
Merged

Recomputable #762

merged 7 commits into from
May 15, 2019

Conversation

strake
Copy link
Contributor

@strake strake commented May 7, 2019

Given a decidable relation, we can rebuild a relevant proof given an irrelevant one. Please feel free to propose a better name if you have one! I wasn't sure what to call it.

@gallais
Copy link
Member

gallais commented May 7, 2019

Note that this type alias could readily be used in:

I don't know what a good name for this principle would be though.

Edit: oh wait, no. It can only be used in Data.Rational.Properties. This is the
binary version of the unary principle we have in Relation.Nullary.

@strake
Copy link
Contributor Author

strake commented May 7, 2019

@gallais We could use it in Data.Rational.Properties but i'm not sure how much we gain for a private lemma — Irrelevant′ (λ n d → Coprime n (suc d)) is not much shorter than ∀ {n d} → .(Coprime n (suc d)) → Coprime n (suc d).

@strake
Copy link
Contributor Author

strake commented May 9, 2019

@gallais All done

@MatthewDaggitt
Copy link
Contributor

Hmm for starters I agree with @strake that the current name isn't great. Perhaps something like Recomputable?

My second question is what's the use case for this? Are there instances of common non-decidable relations for which this holds? If not, and it's only useful in the two recomputable lemmas then perhaps it doesn't deserve it's own type?

@strake
Copy link
Contributor Author

strake commented May 12, 2019

@MatthewDaggitt The obvious example to me is pointwise equality of functions given recomputable equality of the codomain:

module _ {a b} {A : Set a} {B : A  Set b} where
    _≃_ : Rel ((a : A)  B a) (a ⊔ b)
    f ≃ g =  {a}  f a ≡ g a

    ≃-irrel′ : ( {a}  Irrelevant′ (_≡_ {_} {B a}))  Irrelevant′ _≃_
    ≃-irrel′ d x = d x

    ≃-dec : ( {a}  Decidable (_≡_ {_} {B a}))  Decidable _≃_
    ≃-dec d f g = {!!} -- I not believe it's provable.

Edit: This includes certain representations of ℝ, for example: ℕ → Bool (binary expansion, Stern-Brocot, whatever you like).

@strake
Copy link
Contributor Author

strake commented May 12, 2019

And "Recomputable" is fine for me.

@strake
Copy link
Contributor Author

strake commented May 12, 2019

@MatthewDaggitt Renamed as Recomputable.

@MatthewDaggitt
Copy link
Contributor

Edit: This includes certain representations of ℝ, for example: ℕ → Bool (binary expansion, Stern-Brocot, whatever you like).

Thanks, that's a great example! Would you be able to add the Unary version as well for completeness? Also as it's a bit of an uncommon name I think the full name should probably be used, i.e. dec⟶recomputable rather than dec⟶recomput.

Once that's done, I'll merge it in.

@strake
Copy link
Contributor Author

strake commented May 13, 2019

@MatthewDaggitt All done ☺

@MatthewDaggitt MatthewDaggitt changed the title irrelevance′ Recomputable May 13, 2019
@MatthewDaggitt MatthewDaggitt merged commit 8b11f98 into agda:master May 15, 2019
@strake strake deleted the irrelevance′ branch May 15, 2019 02:54
@jamesmckinna jamesmckinna mentioned this pull request Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants