# Strengthening inductive hypothesis for lists?

**URL:** <https://discourse.rocq-prover.org/t/strengthening-inductive-hypothesis-for-lists/609>\
**Category:** Using Rocq\
**Created:** [February 9, 2020, 6:21am UTC](https://discourse.rocq-prover.org/t/strengthening-inductive-hypothesis-for-lists/609 "2020-02-09T06:21:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nojb](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/nojb/32/256_2.png) [@nojb](https://discourse.rocq-prover.org/u/nojb)\
**Post date:** [February 9, 2020, 6:21am UTC](https://discourse.rocq-prover.org/t/strengthening-inductive-hypothesis-for-lists/609/1 "2020-02-09T06:21:52Z")

</div>

Hello,

I have an inductive type that uses `list`. When trying to prove things by induction on on it, I can’t manage to get an induction hypothesis for the elements of the `list`:

```auto
Inductive things : Type :=
| B : bool -> things
| A : list things -> things.

Inductive is_true : things -> Prop :=
| Foo_B : forall b, b = true -> is_true (B b)
| Foo_A : forall ts, Forall is_true ts -> is_true (A ts).

Fixpoint is_trueb (t : things) : bool :=
  match t with
  | B b => b
  | A ts => forallb is_trueb ts
  end.

Lemma sound: ∀ t,
    is_trueb t = true -> is_true t.
Proof.
  induction t.
  - (* B *) simpl. constructor. assumption.
  - (* A *) (* I'm here *) 

```

At this point I have to prove:

```auto
  l : list things
  ============================
  is_trueb (A l) = true → is_true (A l)

```

and I would ideally like to have a hypothesis of the form:

```auto
H : forall x, In x l -> is_trueb x = true -> is_true x

```

Any ideas how to go about this? Thanks!

---

<div class="post-metadata">

**Author:** ![olaure01](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/olaure01/32/733_2.png) [@olaure01](https://discourse.rocq-prover.org/u/olaure01)\
**Post date:** [February 9, 2020, 7:18am UTC](https://discourse.rocq-prover.org/t/strengthening-inductive-hypothesis-for-lists/609/2 "2020-02-09T07:18:06Z")

</div>

You may have a look at [Nested Inductive Types](http://adam.chlipala.net/cpdt/html/Cpdt.InductiveTypes.html#lab32).
