Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7062145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:33:32+00:00 2026-05-28T04:33:32+00:00

edit: I should probably say how I am currently worked around the problem here.

  • 0

edit: I should probably say how I am currently worked around the problem here. I defined a principle for showing equality of permutations,

Lemma permInd : ∀ (U : Type) (A : Ensemble U) (φ ψ : Perm A),
  φ ↓ = ψ ↓ → φ ↑ = ψ ↑ → φ = ψ

then applied the lemma in the proof context that’s giving me trouble below and shows that the eta-equivalent terms are equal. The problem therefore seems to be showing eta-equivalence when the terms are nested inside the record. But I’m not good at working with records, so I might be missing something.

original:

I am having trouble proving the equality of eta-equivalent terms nested in record fields. For reference, eta-reduction is independently provable by reflexivity:

Lemma etaEquivalence : ∀ (A B : Type) (f : A → B), (λ x : A, f x) = f.
Proof. reflexivity. Qed.

In my current proof context, I have two records the equality of which I must prove. Fully destructed and unfolded, the proof context and current subgoal looks like this:

U : Type
A : Ensemble U
perm0 : U → U
pinv0 : U → U
permutes0 : IsPerm A perm0 pinv0
============================
 {|
 perm := λ x : U, perm0 x;
 pinv := λ x : U, pinv0 x;
 permutes := permutationComp permutes0 (permutationId A) |} =
 {| perm := perm0; pinv := pinv0; permutes := permutes0 |}

The equalities that must be established are

perm0 = λ x : U, perm0 x
pinv0 = λ x : U, pinv0 x

Because these equalities can be established by reflexivity, I’m unsure what the problem is. However, I suspect something is awry, because attempting to replace λ x : U, perm0 x with perm0 generates the appropriate subgoal, but doesn’t replace the term inside the record. Furthermore, rewriting using eqa_reduction causes errors regarding abstraction causing ill-typed terms or nested dependent arguments.

I’ve simplified the context as much as possible and pasted it below. Beyond stylistic problems and the fact that I’m still a beginner, I don’t see any problems with the current development.

Require Import Unicode.Utf8 Utf8_core Ensembles Setoid.

Class IsPerm {U : Type} (A : Ensemble U) (φ ψ :  U → U) : Prop := {
  pinvLeft    : ∀ x : U, ψ (φ x) = x;
  pinvRight   : ∀ x : U, φ (ψ x) = x;
  closedPerm  : ∀ x : U, In U A x → In U A (φ x);
  closedPinv  : ∀ x : U, In U A x → In U A (ψ x)
}.

Record Perm {U : Type} (A : Ensemble U) : Type := {
  perm : U → U;
  pinv : U → U;
  permutes :> IsPerm A perm pinv
}.

Notation "f ∘ g"  := (λ x, f (g x)) (at level 45).
Notation "P ↓"    := (@perm _ _ P)  (at level 2, no associativity).
Notation "P ↑"    := (@pinv _ _ P)  (at level 2, no associativity).

Instance permutationComp
  {U : Type} {A : Ensemble U} {f g k h : U → U}
    (P : IsPerm A f k) (Q : IsPerm A g h) : IsPerm A (f ∘ g) (h ∘ k).
Proof.
  constructor; intros.
  setoid_rewrite pinvLeft. apply pinvLeft.
  setoid_rewrite pinvRight. apply pinvRight.
  apply closedPerm. apply closedPerm. auto.
  apply closedPinv. apply closedPinv. auto.
Defined.

Instance permutationId
  {U : Type} (A : Ensemble U) :
    IsPerm A (λ x : U, x) (λ x : U, x).
Proof. constructor; intros; auto. Defined.

Definition permComp
  {U : Type} (A : Ensemble U)
    (φ : Perm A) (ψ : Perm A) : Perm A :=
  Build_Perm U A (φ↓ ∘ ψ↓) (ψ↑ ∘ φ↑)
    (permutationComp (permutes A φ) (permutes A ψ)).

Definition permId {U : Type} (A : Ensemble U) : Perm A :=
  Build_Perm U A (λ x : U, x) (λ x : U, x) (permutationId A).

(* problems occur after the application of the tactic simpl, below: *)

Lemma permCompRightIdentity :
  ∀ {U : Type} (A : Ensemble U) (φ : Perm A), permComp A φ (permId A) = φ.
Proof. intros. unfold permComp. simpl. admit. Qed.

Finally, I want to thank everyone here for helping me out with Coq and being patient.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:33:33+00:00Added an answer on May 28, 2026 at 4:33 am

    Proof irrelevance is not built-in in Coq. You can easily prove what you want if you assume the proof irrelevance axiom:

    Require Import ProofIrrelevance.
    
    Lemma permCompRightIdentity :
      ∀ {U : Type} (A : Ensemble U) (φ : Perm A), permComp A φ (permId A) = φ.
    Proof.
      intros. unfold permComp. simpl.
      destruct φ.
      f_equal.
      apply proof_irrelevance.
    Qed.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: Duplicate of Should Entity Framework Context be Put into Using Statement? I've been
EDIT: I suppose I should clarify, in case it matters. I am on a
[EDIT] Hmm. Perhaps this question should be titled what is the default user-input dialog
Edit: I am using SqlDataAdapters to fill the data sets. Sorry--I should have been
within my App it should be forbidden to edit (customize) the TabBar. This means
EDIT: I've learnt, and it's probably true that YouTube uses MySQL. But it probably
EDIT: Managed to test it all and I guess my friend was wrong here,
New Rails programmer here. There is probably a pretty simple solution to this, but
This is a very basic question with probably an easy answer. Let's say I
Edit: This question was written in 2008, which was like 3 internet ages ago.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.