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 915479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:53:39+00:00 2026-05-15T17:53:39+00:00

I have the defined inductive types: Inductive InL (A:Type) (y:A) : list A ->

  • 0

I have the defined inductive types:

Inductive InL (A:Type) (y:A) : list A -> Prop := 
  | InHead : forall xs:list A, InL y (cons y xs) 
  | InTail : forall (x:A) (xs:list A), InL y xs -> InL y (cons x xs).

Inductive SubSeq (A:Type) : list A -> list A -> Prop :=
 | SubNil : forall l:list A, SubSeq nil l
 | SubCons1 : forall (x:A) (l1 l2:list A), SubSeq l1 l2 -> SubSeq l1 (x::l2)
 | SubCons2 : forall (x:A) (l1 l2:list A), SubSeq l1 l2 -> SubSeq (x::l1) (x::l2).

Now I have to prove a series of properties of that inductive type, but I keep getting stuck.

Lemma proof1: forall (A:Type) (x:A) (l1 l2:list A), SubSeq l1 l2 -> InL x l1 -> InL x l2.
Proof.
 intros.
 induction l1.
 induction l2.
 exact H0.

Qed.

Can some one help me advance.

  • 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-15T17:53:39+00:00Added an answer on May 15, 2026 at 5:53 pm

    In fact, it is easier to do an induction on the SubSet judgment directly.
    However, you need to be as general as possible, so here is my advice:

    Lemma proof1: forall (A:Type) (x:A) (l1 l2:list A), 
      SubSeq l1 l2 -> InL x l1 -> InL x l2.
    (* first introduce your hypothesis, but put back x and In foo
       inside the goal, so that your induction hypothesis are correct*)
    intros. 
    revert x H0. induction H; intros.
    (* x In [] is not possible, so inversion will kill the subgoal *)
    inversion H0.
    
    (* here it is straitforward: just combine the correct hypothesis *)
    apply InTail; apply IHSubSeq; trivial.
    
    (* x0 in x::l1 has to possible sources: x0 == x or x0 in l1 *)
    inversion H0; subst; clear H0.
    apply InHead.
    apply InTail; apply IHSubSeq; trivial.
    Qed.
    

    “inversion” is a tactic that checks an inductive term and gives you all the possible way to build such a term !!without any induction hypothesis!!
    It only gives you the constructive premices.

    You could have done it directly by induction on l1 then l2, but you would have to construct by hand the correct instance of inversion because your induction hypothesis would have been really weak.

    Hope it helps,
    V.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have defined following control template for my custom control. <ControlTemplate TargetType={x:Type local:CustomControl}> <Grid
I have defined a table type PL/SQL variable and added some data there. create
I have defined in XAML a list view, see following fragment: <Grid> <Button Content=_Generate
I have a user-defined type: create or replace type my_message_type as object (relatedid varchar2(50),
I have an adjacency list defined as shown below. At this point I need
I have an object CategoryBean where are defined a list of other objects CategoryBean
I have defined the following class using COM to use the IGroupPolicyObject using C#.NET:
I have defined a ConfigurationProperty class, which is basicly a key-value pair (with key
I have defined the following two functions test <- function(t) { return( (0.5*eta^2/theta)*(1-exp(-2*theta*t)) )
I have defined CSS in MasterPage so that all pages can use the same

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.