(* Gabriel Braun April 2013 *)

Require Export GeoCoq.Tarski_dev.Ch13_3_angles.

Ltac anga_instance_o a A B P C :=
        assert(tempo_anga:= anga_const_o a A B P);
        match goal with
           |H: Q_CongA_Acute a |-  _ => assert(tempo_H:= H); apply tempo_anga in tempo_H; ex_elim tempo_H C
        end;
        clear tempo_anga.

Section Cosinus.

Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.

(************************************* cos *****************************)

Lemma l13_6 : forall a lc ld l, Lcos lc l a -> Lcos ld l a -> EqL lc ld.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos Tn lp l b *)
    unfold Lcos in *.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
    ex_and H6 X1.
    ex_and H7 Y1.
    ex_and H6 Z1.
    ex_and H3 X2.
    ex_and H10 Y2.
    ex_and H3 Z2.
(* Goal: @EqL Tn lab lba *)
    clean_duplicated_hyps.
    assert(Len X1 Z1 l).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
    assert(Len X2 Z2 l).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
    assert(Cong X1 Z1 X2 Z2).
      eapply (is_len_cong _ _ _ _ l); auto.
    assert(Ang_Acute Y1 X1 Z1 a).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
    assert(Ang_Acute Y2 X2 Z2 a).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
    assert(CongA Y1 X1 Z1 Y2 X2 Z2).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      apply (is_anga_conga _ _ _ _ _ _ a); split; auto.
    assert(Len X1 Y1 lc).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
    assert(Len X2 Y2 ld).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
    induction(eq_dec_points Z1 Y1).
      subst Z1.
      assert(Out X2 Y2 Z2).
        apply (eq_conga_out Y1 X1); auto.
      assert(Y2 = Z2).
        assert(Z2 = Y2 \/ X2 = Y2).
          apply l8_9.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
          apply out_col in H19.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          Col.
        induction H20.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
        unfold Out in H19.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        spliter.
        subst Y2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        tauto.
      subst Z2.
      assert(EqL l lc).
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply ex_eql.
        exists X1.
        exists Y1.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
        split; auto.
      assert(EqL l ld).
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply ex_eql.
        exists X2.
        exists Y2.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
        split; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
     transitivity l;auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
     symmetry; auto.
    assert(Z2 <> Y2).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
      subst Z2.
      assert(Out X1 Y1 Z1).
        apply (eq_conga_out Y2 X2).
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
        apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
      assert(Y1 = Z1).
        assert(Z1 = Y1 \/ X1 = Y1).
          apply l8_9.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
          apply out_col in H20.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          Col.
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
        induction H21.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
        subst Y1.
        unfold Out in H20.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        tauto.
      subst Z1.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      tauto.
    apply conga_distinct in H16.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
    assert(CongA X1 Y1 Z1 X2 Y2 Z2).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply l11_16; Perp; auto.
    assert(~Col Z1 X1 Y1).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
      assert(X1 = Y1 \/ Z1 = Y1).
        apply l8_9.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          Perp.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        Col.
      induction H27.
        subst Y1.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        tauto.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      contradiction.
    apply conga_comm in H16.
    apply cong_commutativity in H13.
    assert(HH:=l11_50_2 Z1 X1 Y1 Z2 X2 Y2 H26 H25 H16 H13).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
    apply ex_eql.
    exists X1.
    exists Y1.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
    eapply is_len_cong_is_len.
      apply H18.
(* Goal: @Cong Tn A2 B2 A1 B1 *)
    Cong.
Qed.

Lemma null_lcos_eql : forall lp l a, Lcos lp l a -> Q_CongA_Null_Acute a -> EqL l lp.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: False *)
    unfold Lcos in H.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @EqL Tn l lp *)
    ex_and H3 A.
(* Goal: False *)
    ex_and H4 B.
(* Goal: @EqL Tn l lp *)
    ex_and H3 C.
(* Goal: @EqL Tn l lp *)
    unfold Q_CongA_Null_Acute in H0.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @EqL Tn l lp *)
    assert(HH:= H7 B A C H6).
(* Goal: @EqL Tn l lp *)
    assert(Col A B C) by (apply out_col;auto).
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
    assert(Col C B A) by Col.
(* Goal: @EqL Tn l lp *)
    assert(HQ:= l8_9 C B A H3 H9).
(* Goal: @EqL Tn l lp *)
    induction HQ.
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
      subst C.
(* Goal: @EqL Tn l lp *)
(* Goal: @EqL Tn l lp *)
      apply (all_eql A B).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
        split; auto.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_CongA_Acute Tn a *)
    subst B.
(* Goal: @EqL Tn l lp *)
    exfalso.
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
    unfold Out in HH.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    tauto.
Qed.

Lemma eql_lcos_null : forall l lp a, Lcos l lp a -> EqL l lp -> Q_CongA_Null_Acute a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: False *)
    unfold Lcos in H.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos Tn l l a *)
    ex_and H3 B.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
    ex_and H4 A.
(* Goal: @EqL Tn l lp *)
    ex_and H3 C.
    assert(forall A0 B0 : Tpoint, l A0 B0 <-> lp A0 B0).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply H0; auto.
    assert(HP:= (H7 B A)).
    assert(HQ:= (H7 B C)).
    destruct HP.
    destruct HQ.
    assert(l B C).
      apply H11.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
    assert(lp B A).
      apply H8.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
    clear H7 H8 H9 H10 H11.
    assert(Cong B A B C).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (lg_cong l); auto.
    unfold Per in H3.
    ex_and H3 B'.
    assert(HH:= anga_distinct a A B C H2 H6).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
    assert(A = C).
      eapply (l4_18 B B').
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
        intro.
        subst B'.
        apply l7_3 in H3.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        contradiction.
        unfold Midpoint in H3; assert(HH:= midpoint_col).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        spliter.
        apply bet_col in H3.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        Col.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
      unfold Midpoint in H3.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
      eapply cong_transitivity.
        apply cong_symmetry.
        apply cong_commutativity.
        apply H11.
      eapply cong_transitivity.
        apply cong_commutativity.
        apply H7.
(* Goal: @Cong Tn A2 B2 A1 B1 *)
      Cong.
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
    subst C.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
    unfold Q_CongA_Null_Acute.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
    intros A0 B0 C0 HP.
    apply (eq_conga_out A B).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (anga_conga a); auto.
Qed.

Lemma lcos_lg_not_null: forall l lp a, Lcos l lp a -> ~ Q_Cong_Null l /\ ~ Q_Cong_Null lp.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: False *)
    unfold Lcos in H.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
    ex_and H2 A.
(* Goal: @Lcos Tn l l a *)
    ex_and H3 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
    ex_and H2 C.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    assert(HH:= anga_distinct a B A C H1 H5).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Q_Cong_Null Tn l *)
(* Goal: @Q_CongA_Acute Tn a *)
    unfold Q_Cong_Null.
(* Goal: and (not (and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)))) (not (and (@Q_Cong Tn lp) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A)))) *)
    split; intro; spliter; ex_and H9 X.
(* Goal: False *)
(* Goal: False *)
      assert (Cong A B X X) by (apply (lg_cong l); auto).
(* Goal: False *)
      treat_equalities;intuition.
(* Goal: False *)
    assert(Cong A C X X) by (apply (lg_cong lp); auto).
(* Goal: False *)
    treat_equalities;intuition.
Qed.

Lemma perp_acute_out : forall A B C C', Acute A B C -> Perp A B C C' -> Col A B C' -> Out B A C'.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
    apply l6_6.
(* Goal: @Out Tn B C' A *)
    apply acute_col_perp__out with C.
(* Goal: @Acute Tn C B A *)
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply acute_sym.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      assumption.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      Col.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      Perp.
Qed.

End Cosinus.

Require Import Morphisms.

Section Cosinus2.

Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.

Lemma perp_out__acute : forall A B C C', Perp A B C C' -> Col A B C' -> (Acute A B C <-> Out B A C').
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (perp_acute_out _ _ C); auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (perp_out_acute _ _ C C'); auto.
Qed.

Lemma obtuse_not_acute : forall A B C, Obtuse A B C -> ~ Acute A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: False *)
    unfold Obtuse in H.
(* Goal: False *)
    unfold Acute in H0.
(* Goal: False *)
    ex_and H A0.
(* Goal: False *)
    ex_and H1 B0.
(* Goal: False *)
    ex_and H C0.
(* Goal: False *)
    ex_and H0 A1.
(* Goal: False *)
    ex_and H2 B1.
(* Goal: False *)
    ex_and H0 C1.
(* Goal: False *)
    assert(A0 <> B0 /\ C0 <> B0 /\ A1 <> B1 /\ C1 <> B1 /\ A <> B /\ C <> B).
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
(* Goal: False *)
      unfold GtA in H1.
(* Goal: False *)
      unfold LtA in *.
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
(* Goal: False *)
      unfold LeA in *.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
(* Goal: False *)
      ex_and H1 P0.
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
(* Goal: False *)
      ex_and H2 P.
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
(* Goal: False *)
      unfold InAngle in H2.
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
(* Goal: @Bet Tn A B C' *)
      unfold CongA in H5 .
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
(* Goal: False *)
      unfold CongA in H6 .
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      repeat split; auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    assert(CongA A0 B0 C0 A1 B1 C1).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply l11_16; auto.
(* Goal: False *)
    assert(GtA A B C A1 B1 C1).
(* Goal: @GtA Tn A B C A1 B1 C1 *)
(* Goal: False *)
      apply (conga_preserves_gta A B C A0 B0 C0).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply conga_refl; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      assumption.
(* Goal: False *)
    assert(HH:=not_lta_and_gta A B C A1 B1 C1).
(* Goal: False *)
    apply HH.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma acute_not_obtuse : forall A B C, Acute A B C -> ~ Obtuse A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: False *)
    apply obtuse_not_acute in H0.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
    contradiction.
Qed.

Lemma perp_obtuse_bet : forall A B C C', Perp A B C C' -> Col A B C' -> Obtuse A B C -> Bet A B C'.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Bet Tn A B C' *)
    assert(HH:= H1).
(* Goal: @Bet Tn A B C' *)
    unfold Obtuse in HH.
(* Goal: @Bet Tn A B C' *)
    ex_and HH A0.
(* Goal: @Bet Tn A B C' *)
    ex_and H2 B0.
(* Goal: @Bet Tn A B C' *)
    ex_and H3 C0.
(* Goal: @Bet Tn A B C' *)
    assert(A0 <> B0 /\ C0 <> B0 /\ A <> B /\ C <> B).
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      unfold GtA in H3.
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      unfold LtA in H3.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      unfold LeA in H3.
(* Goal: @Acute Tn A B C *)
      ex_and H3 P.
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
(* Goal: @Bet Tn A B C' *)
      unfold CongA in H5.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      repeat split; auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
      subst C.
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      apply perp_comm in H.
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      apply perp_not_col in H.
(* Goal: @Out Tn B A C *)
      apply H.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      Col.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    assert(B <> C').
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: False *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      subst C'.
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      assert(Per A B C).
(* Goal: @Per Tn A B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply perp_in_per.
(* Goal: @Perp_at Tn B A B B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply perp_in_comm.
(* Goal: @Perp_at Tn B B A C B *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply perp_perp_in.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        Perp.
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      assert(CongA A0 B0 C0 A B C).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply l11_16; auto.
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      unfold GtA in H3.
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      unfold LtA in H3.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: False *)
(* Goal: @Bet Tn A B C' *)
      unfold LeA in H3.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      contradiction.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
    induction H0.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Bet Tn A B C' *)
    assert(Out B A C').
(* Goal: @Out Tn B A C' *)
(* Goal: @Bet Tn A B C' *)
      unfold Out.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      repeat split; auto.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      induction H0.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
        right.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: or (@Per Tn A P B) (@Obtuse Tn A P B) *)
      left.
(* Goal: @Bet Tn A D C *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
      Between.
(* Goal: @Bet Tn A B C' *)
    eapply (perp_out_acute _ _ C) in H9.
(* Goal: @Bet Tn A B C' *)
(* Goal: @Perp Tn A B C C' *)
      apply obtuse_not_acute in H1.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      contradiction.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
Qed.

Lemma lcos_const0 : forall l lp a, Lcos lp l a -> Q_CongA_Null_Acute a ->
 exists A, exists B, exists C, l A B /\ lp B C /\ a A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: lp A B *)
    assert(HH:=H).
(* Goal: lp A B *)
    unfold Lcos in HH.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
    ex_and H4 A.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
    ex_and H5 B.
(* Goal: @Lcos Tn l l a *)
    ex_and H4 C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
    exists C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
    exists B.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    repeat split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply lg_sym; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply anga_sym; auto.
Qed.

Lemma lcos_const1 : forall l lp a P, Lcos lp l a -> ~ Q_CongA_Null_Acute a ->
 exists A, exists B, exists C, ~Col A B P /\ OS A B C P /\ l A B /\ lp B C /\ a A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: lp A B *)
    assert(HH:=H).
(* Goal: lp A B *)
    unfold Lcos in HH.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(HH:= (lcos_lg_not_null lp l a H)).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
    lg_instance_not_col l P A B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
    exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
    assert(HH:=anga_const_o a A B P H8 H0 H3).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    ex_and HH C'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
    assert(A <> B /\ B <> C').
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) B C')) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
      assert(HP:= anga_distinct a A B C' H3 H9).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
    assert(HH:=ex_point_lg_out lp B C' H12 H1 H5).
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
    ex_and HH C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
    exists C.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @OS Tn A B C P *)
(* Goal: a A B C *)
      assert(~ Col A B C').
(* Goal: not (@Col Tn A B C') *)
(* Goal: @OS Tn A B C P *)
(* Goal: a A B C *)
        unfold OS in H10.
(* Goal: not (@Col Tn A B C') *)
(* Goal: @OS Tn A B C P *)
(* Goal: a A B C *)
        ex_and H10 D.
(* Goal: not (@Col Tn A B C') *)
(* Goal: @OS Tn A B C P *)
(* Goal: a A B C *)
        unfold TS in H10.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        spliter.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
        intro.
(* Goal: False *)
(* Goal: @OS Tn A B C P *)
(* Goal: a A B C *)
        apply H10.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        Col.
(* Goal: @OS Tn A B C P *)
(* Goal: a A B C *)
      assert(HP:=out_one_side_1 A B C' C B H15).
(* Goal: @OS Tn A B C P *)
(* Goal: a A B C *)
      eapply (one_side_transitivity _ _ _ C').
(* Goal: @OS Tn B A P D *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply one_side_symmetry.
(* Goal: @OS Tn A B C' C *)
(* Goal: @OS Tn A B C' P *)
(* Goal: a A B C *)
        apply HP.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          Col.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
        apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (anga_out_anga a A B C'); auto.
(* Goal: @Out Tn A1 B1 B1 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
      apply out_trivial.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
    apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma lcos_const : forall lp l a, Lcos lp l a ->
 exists A, exists B, exists C, lp A B /\ l B C /\ a A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: False *)
    unfold Lcos in H.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
    ex_and H2 A.
(* Goal: @Lcos Tn l l a *)
    ex_and H3 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
    ex_and H2 C.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
    exists B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    exists A.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
    exists C.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply lg_sym; auto.
Qed.

Lemma lcos_lg_distincts : forall lp l a A B C, Lcos lp l a -> l A B -> lp B C -> a A B C -> A <> B /\ C <> B.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(HH:= lcos_lg_not_null lp l a H).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
    unfold Q_Cong_Null in *.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_CongA_Acute Tn a *)
      subst B.
(* Goal: False *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
      apply H4.
(* Goal: False *)
      unfold Lcos in H.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
      split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        tauto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
      exists A.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
    subst C.
(* Goal: False *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    apply H3.
(* Goal: False *)
    unfold Lcos in H.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      tauto.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
    exists B.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.


Lemma lcos_const_a : forall lp l a B, Lcos lp l a -> exists A, exists C, l A B /\ lp B C /\ a A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: lp A B *)
    assert(HH:=H).
(* Goal: lp A B *)
    unfold Lcos in HH.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
    clear H3.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
    assert(HH:= ex_point_lg l B H1).
(* Goal: @Lcos Tn l l a *)
    ex_and HH A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
    assert(l A B).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply lg_sym; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    exists A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(HH:= lcos_lg_not_null lp l a H).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
    assert(A <> B).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: False *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      subst A.
(* Goal: False *)
(* Goal: @Per Tn A B C *)
      apply H6.
(* Goal: @Q_Cong_Null Tn l *)
(* Goal: @Q_CongA_Acute Tn a *)
      unfold Q_Cong_Null.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
      split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
      exists B.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
    assert(HH:= anga_const a A B H2 H7).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    ex_and HH C'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
    assert(HH:= anga_distincts a A B C' H2 H8).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(B <> C'); auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
    assert(HH:= ex_point_lg_out lp B C' H11 H0 H5).
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
    ex_and HH C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
    exists C.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (anga_out_anga a A B C' A C); auto.
(* Goal: @Out Tn A1 B1 B1 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
      apply out_trivial.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
    apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.


Lemma lcos_const_ab : forall lp l a B A, Lcos lp l a -> l A B -> exists C, lp B C /\ a A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: lp A B *)
    assert(HH:=H).
(* Goal: lp A B *)
    unfold Lcos in HH.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    clear H4.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(HH:= lcos_lg_not_null lp l a H).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
    assert(A <> B).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: False *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      subst A.
(* Goal: False *)
(* Goal: @Out Tn B C P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply H5.
(* Goal: @Q_Cong_Null Tn l *)
(* Goal: @Q_CongA_Acute Tn a *)
      unfold Q_Cong_Null.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
      split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
      exists B.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
    assert(HH:= anga_const a A B H3 H6).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    ex_and HH C'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
    assert(HH:= anga_distincts a A B C' H3 H7).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(B <> C'); auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
    assert(HH:= ex_point_lg_out lp B C' H10 H1 H4).
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
    ex_and HH C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
    exists C.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (anga_out_anga a A B C' A C); auto.
(* Goal: @Out Tn A1 B1 B1 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
      apply out_trivial.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
    apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma lcos_const_cb : forall lp l a B C, Lcos lp l a -> lp B C -> exists A, l A B /\ a A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: lp A B *)
    assert(HH:=H).
(* Goal: lp A B *)
    unfold Lcos in HH.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    clear H4.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(HH:= lcos_lg_not_null lp l a H).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(C <> B).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
      subst C.
(* Goal: False *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
      apply H4.
(* Goal: @Q_Cong_Null Tn l *)
(* Goal: @Q_CongA_Acute Tn a *)
      unfold Q_Cong_Null.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
      split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
      exists B.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(HH:= anga_const a C B H3 H6).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    ex_and HH A'.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(HH:= anga_distincts a C B A' H3 H7).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(B <> A'); auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
    assert(HH:= ex_point_lg_out l B A' H10 H2 H5).
(* Goal: @Lcos Tn l l a *)
    ex_and HH A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    exists A.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply lg_sym; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply(anga_out_anga a A' B C); auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply anga_sym; auto.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
      apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Out Tn A1 B1 B1 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
    apply out_trivial.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma lcos_lg_anga : forall l lp a, Lcos lp l a -> Lcos lp l a /\ Q_Cong l /\ Q_Cong lp /\ Q_CongA_Acute a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: False *)
    unfold Lcos in H.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    tauto.
Qed.

Lemma lcos_eql_lcos : forall lp1 l1 lp2 l2 a, EqL lp1 lp2 -> EqL l1 l2 -> Lcos lp1 l1 a -> Lcos lp2 l2 a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos Tn lp l b *)
    unfold Lcos in *.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
    ex_and H4 A.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
    ex_and H5 B.
(* Goal: @Lcos Tn l l a *)
    ex_and H4 C.

(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
    assert(HH:=lg_eql_lg l1 l2 H2 H0).
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
    assert(HP:=lg_eql_lg lp1 lp2 H1 H).
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
    exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
    exists C.
(* Goal: and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))) *)
    unfold EqL in *.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @Out Tn B A C *)
      apply H.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply H0; auto.
Qed.

Global Instance lcos_morphism :
 Proper (EqL ==> EqL ==> eq ==> iff) Lcos.
Proof.
(* Goal: @Proper (forall (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop), Prop) (@respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (forall (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop), Prop) (@EqL Tn) (@respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (forall _ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop, Prop) (@EqL Tn) (@respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) Prop (@eq (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop)) iff))) (@Lcos Tn) *)
unfold Proper.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
split.
 - rewrite H1.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
   intro.
(* Goal: @Lcos Tn y y0 y1 *)
   eauto using lcos_eql_lcos.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
 - intro.
(* Goal: @Lcos Tn x x0 x1 *)
   rewrite H1.
   eapply lcos_eql_lcos with y y0;
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
   try symmetry;assumption.
Qed.


Lemma lcos_not_lg_null : forall lp l a, Lcos lp l a -> ~ Q_Cong_Null lp.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: False *)
    unfold Q_Cong_Null in H0.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    unfold Lcos in H.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    ex_and H4 B.
(* Goal: False *)
    ex_and H5 A.
(* Goal: @Lcos Tn l l a *)
    ex_and H4 C.
(* Goal: False *)
    ex_and H1 P.
(* Goal: False *)
    unfold Q_Cong in H0.
(* Goal: False *)
    ex_and H0 X.
(* Goal: False *)
    ex_and H1 Y.
(* Goal: False *)
    assert(HH:= (H0 B A)).
(* Goal: @Lcos3 Tn lp l a c b *)
    destruct HH.
(* Goal: False *)
    assert(HH:= (H0 P P)).
(* Goal: @Lcos3 Tn lp l a c b *)
    destruct HH.
(* Goal: False *)
    apply H11 in H8.
(* Goal: False *)
    apply H9 in H5.
(* Goal: False *)
    assert(Cong B A P P).
(* Goal: @Cong Tn A2 B2 A1 B1 *)
      apply (cong_transitivity _ _ X Y); Cong.
(* Goal: False *)
    assert(A = B).
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: False *)
      eapply (cong_identity _ _ P).
(* Goal: @Cong Tn A2 B2 A1 B1 *)
      Cong.
(* Goal: False *)
    assert(HH:=anga_distincts a A B C H3 H7).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
    contradiction.
Qed.

Lemma lcos_const_o : forall lp l a A B P, ~ Col A B P -> ~ Q_CongA_Null_Acute a -> Q_Cong l -> Q_Cong lp ->
  Q_CongA_Acute a -> l A B -> Lcos lp l a ->
  exists C, OS A B C P /\ a A B C /\ lp B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    assert(HH:= anga_const_o a A B P H H0 H3).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    ex_and HH C'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    assert(A <> B /\ C' <> B).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (anga_distincts a); auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    assert(HH:= lcos_not_lg_null lp l a H5).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    assert (B <> C').
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: False *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
      apply H9.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    assert(HP:=lg_exists C' B).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    ex_and HP lc'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    assert(HQ:=anga_not_lg_null a l lc' A B C' H1 H11 H3 H4 H12 H6).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    assert(HR:= ex_point_lg_out lp B C' H10 H2 HH).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
    ex_and HR C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
    exists C.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @OS Tn B A P C' *)
(* Goal: @Out Tn B C' C *)
(* Goal: and (a A B C) (lp B C) *)
      apply invert_one_side.
(* Goal: @OS Tn B A P D *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply one_side_symmetry.
(* Goal: @OS Tn B A P C *)
(* Goal: and (a A B C) (lp B C) *)
      apply (out_out_one_side _ _ _ C').
(* Goal: @OS Tn B A P C' *)
(* Goal: @Out Tn B C' C *)
(* Goal: and (a A B C) (lp B C) *)
        apply invert_one_side.
(* Goal: @OS Tn B A P D *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply one_side_symmetry.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
      apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      eapply (anga_out_anga a A B C'); auto.
(* Goal: @Out Tn A1 B1 B1 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
        apply out_trivial.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
      apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma flat_not_acute : forall A B C, Bet A B C -> ~ Acute A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: False *)
    unfold Acute in H0.
(* Goal: False *)
    ex_and H0 A'.
(* Goal: False *)
    ex_and H1 B'.
(* Goal: False *)
    ex_and H0 C'.
(* Goal: False *)
    unfold LtA in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    unfold LeA in H1.
(* Goal: False *)
    ex_and H1 P'.
(* Goal: False *)
    unfold InAngle in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    ex_and H6 X.
(* Goal: False *)
    apply conga_distinct in H3.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    assert(A <> C).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
      subst C.
(* Goal: False *)
(* Goal: False *)
      apply between_identity in H.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      contradiction.
(* Goal: False *)
    induction H7.
(* Goal: False *)
(* Goal: False *)
      subst X.
(* Goal: False *)
      apply H2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply conga_line; auto.
(* Goal: False *)
    assert(CongA A B C A' B' X).
(* Goal: @CongA Tn A B C A' B' X *)
(* Goal: False *)
      apply (out_conga A B C A' B' P').
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply out_trivial; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply out_trivial; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply out_trivial; auto.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
      apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: False *)
    apply H2.
(* Goal: @CongA Tn A B C A' B' C' *)
    assert(Bet A' B' X).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (bet_conga__bet A B C); auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply conga_line; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (between_exchange4 _ _ X); auto.
Qed.

Lemma acute_comp_not_acute : forall A B C D, Bet A B C -> Acute A B D -> ~ Acute C B D.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: False *)
    induction(col_dec A C D).
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
      induction H2.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
        assert(Bet A B D).
(* Goal: @Bet Tn A D C *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
          eBetween.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
        assert(HH:= flat_not_acute A B D H3).
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        contradiction.
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
      induction H2.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
        assert(Bet A B D \/ Bet A D B).
(* Goal: or (@Bet Tn A B D) (@Bet Tn A D B) *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
          apply (l5_3 A B D C).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Bet Tn A D C *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
          Between.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
        induction H3.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
          assert(HH:= flat_not_acute A B D H3).
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          contradiction.
(* Goal: False *)
(* Goal: False *)
        assert(Bet C B D).
(* Goal: @Bet Tn A D C *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
          eBetween.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
        assert(HH:= flat_not_acute C B D H4).
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        contradiction.
(* Goal: False *)
(* Goal: False *)
      assert(Bet C B D).
(* Goal: @Bet Tn A D C *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
        eBetween.
(* Goal: False *)
(* Goal: False *)
      assert(HH:= flat_not_acute C B D H3).
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      contradiction.
(* Goal: False *)
    unfold Acute in *.
(* Goal: False *)
    ex_and H0 A0.
(* Goal: False *)
    ex_and H3 B0.
(* Goal: False *)
    ex_and H0 C0.
(* Goal: False *)
    ex_and H1 A1.
(* Goal: False *)
    ex_and H4 B1.
(* Goal: False *)
    ex_and H1 C1.
(* Goal: False *)
    assert (Hd := H3).
(* Goal: False *)
    assert (Hd' := H4).
(* Goal: False *)
    apply lta_distincts in Hd.
(* Goal: False *)
    apply lta_distincts in Hd'.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: False *)
    assert(HH:=l11_16 A0 B0 C0 A1 B1 C1 H0 H12 H13 H1 H7 H8).
(* Goal: False *)
    assert(LtA C B D A0 B0 C0).
(* Goal: @LtA Tn C B D A0 B0 C0 *)
(* Goal: False *)
      eapply(conga_preserves_lta C B D A1 B1 C1).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply conga_refl; auto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
        apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: False *)
    clear H4.
(* Goal: False *)
    assert(A <> C).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
      subst C.
(* Goal: False *)
(* Goal: False *)
      apply between_identity in H.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      contradiction.
(* Goal: False *)
    assert(Col A C B).
(* Goal: @Col Tn C A B *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: False *)
      apply bet_col in H.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      Col.
(* Goal: False *)
    assert(HP:= l10_15 A C B D H16 H2).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
    ex_and HP P.
(* Goal: False *)
    assert(HP:= perp_col A C P B B H10 H17 H16).
(* Goal: False *)
    apply perp_left_comm in HP.
(* Goal: False *)
    apply perp_perp_in in HP.
(* Goal: False *)
    assert(Per A B P).
(* Goal: @Per Tn A B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_in_per.
(* Goal: @Perp_at Tn B A B B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_in_comm.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: False *)
    assert(HR:= perp_not_eq_2 A C P B H17).
(* Goal: False *)
    assert(HQ:=l11_16 A B P A0 B0 C0 H19 H10 HR H0 H12 H13).
(* Goal: False *)
    assert(LtA A B D A B P).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (conga_preserves_lta A B D A0 B0 C0); auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply conga_refl; auto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
      apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: False *)
    assert(LtA C B D A B P).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (conga_preserves_lta C B D A0 B0 C0); auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply conga_refl; auto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
      apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: False *)
    clear HQ H15 HH H3 H0 H1.
(* Goal: False *)
    unfold LtA in *.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
    assert((LeA A B D A B P <-> LeA C B P C B D)).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (l11_36 A B D A B P C C); auto.
(* Goal: False *)
    destruct H20.
(* Goal: False *)
    assert(LeA C B P C B D).
(* Goal: @LeA Tn C B P C B D *)
(* Goal: False *)
      apply H20.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: False *)
    assert(CongA A B P C B P).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply l11_16; auto.
(* Goal: @Per Tn A B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_in_per.
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: False *)
      assert(Perp C B P B).
(* Goal: @Perp Tn C B P B *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: False *)
        apply(perp_col _ A).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Perp Tn B C P B *)
(* Goal: False *)
          apply perp_left_comm.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Col Tn C A B *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: False *)
        apply bet_col in H.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        Col.
(* Goal: @Perp_at Tn B A B B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_in_comm.
(* Goal: @Perp_at Tn B B A C B *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_perp_in.
(* Goal: @Perp Tn B C P B *)
(* Goal: False *)
      apply perp_left_comm.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: False *)
    assert(LeA A B P C B D).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (l11_30 C B P C B D); auto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
        apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply conga_refl; auto.
(* Goal: False *)
    assert(HH:=lea_asym C B D A B P H0 H24).
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
    contradiction.
Qed.

Lemma lcos_per : forall A B C lp l a, Q_CongA_Acute a -> Q_Cong l -> Q_Cong lp ->
  Lcos lp l a -> l A C -> lp A B -> a B A C -> Per A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Per Tn A B C *)
    induction(eq_dec_points B C).
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
      subst C.
(* Goal: @Per Tn B P P *)
(* Goal: a P B P *)
      apply l8_5.
(* Goal: @Per Tn A B C *)
    unfold Lcos in H2.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Per Tn A B C *)
    ex_and H9 A0.
(* Goal: @Per Tn A B C *)
    ex_and H10 B0.
(* Goal: @Per Tn A B C *)
    ex_and H9 C0.
(* Goal: @Per Tn A B C *)
    assert(CongA B0 A0 C0 B A C).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (anga_conga a); auto.
(* Goal: @Per Tn A B C *)
    assert(Cong A0 C0 A C).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (lg_cong l); auto.
(* Goal: @Per Tn A B C *)
    assert(Cong A0 B0 A B).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (lg_cong lp); auto.
(* Goal: @Per Tn A B C *)
    assert(HH:=l11_49 B0 A0 C0 B A C H13 H15 H14).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Per Tn A B C *)
    assert(B0 <> C0).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: False *)
(* Goal: @Per Tn A B C *)
      subst C0.
(* Goal: False *)
(* Goal: @Per Tn A B C *)
      apply H6.
(* Goal: @eq (@Tpoint Tn) B C *)
(* Goal: @Per Tn A B C *)
      apply (cong_identity _ _ B0).
(* Goal: @Cong Tn A2 B2 A1 B1 *)
      Cong.
(* Goal: @Per Tn A B C *)
    apply H17 in H18.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Per Tn A B C *)
    eapply (l11_17 A0 B0 C0).
(* Goal: @Per Tn P P B *)
(* Goal: a P B P *)
      apply l8_2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma is_null_anga_dec : forall a, Q_CongA_Acute a -> Q_CongA_Null_Acute a \/ ~ Q_CongA_Null_Acute a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn a), or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
    intros a H.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
    assert (H' := H).
(* Goal: @Acute Tn A B C *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    unfold Q_CongA_Acute in H.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
    destruct H as [A [B [C [Hacute HConga]]]].
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
    elim (out_dec B A C); intro Hout.
(* Goal: or (@Per Tn A P B) (@Obtuse Tn A P B) *)
      left.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
      unfold Q_CongA_Null_Acute.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
      intros.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (l11_21_a A B C); auto.
(* Goal: a A B C *)
      apply HConga.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      assumption.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
    right.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
    unfold Q_CongA_Null_Acute.
(* Goal: not (and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C)) *)
    intro H.
(* Goal: False *)
    destruct H as [Hclear H]; clear Hclear.
(* Goal: False *)
    apply Hout.
(* Goal: @Out Tn B A C *)
    apply H.
(* Goal: a A B C *)
    apply HConga.
(* Goal: @CongA Tn A B C A B C *)
    apply acute_distincts in Hacute.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply conga_refl; auto.
Qed.

Lemma lcos_lg : forall a lp l A B C, Lcos lp l a -> Perp A B B C -> a B A C -> l A C -> lp A B.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: lp A B *)
    assert(HH:=H).
(* Goal: lp A B *)
    unfold Lcos in HH.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: lp A B *)
    ex_and H6 A'.
(* Goal: lp A B *)
    ex_and H7 B'.
(* Goal: lp A B *)
    ex_and H6 C'.
(* Goal: lp A B *)
    assert(Cong A C A' C').
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (lg_cong l); auto.
(* Goal: lp A B *)
    assert(CongA B A C B' A' C').
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (anga_conga a); auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
    induction(is_null_anga_dec a).
(* Goal: lp A B *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      assert(HP := null_lcos_eql lp l a H H12).
(* Goal: lp A B *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      unfold Q_CongA_Null_Acute in H12.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: lp A B *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      assert(HH:= (H13 B A C H1)).
(* Goal: not (@Col Tn C A B) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_comm in H0.
(* Goal: not (@Col Tn C A B) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_not_col in H0.
(* Goal: lp A B *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply False_ind.
(* Goal: False *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply H0.
(* Goal: @Col Tn B A C *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply out_col in HH.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      Col.
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply conga_distinct in H11.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      assert(CongA A B C A' B' C').
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply l11_16; auto.
(* Goal: @Per Tn A B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_in_per.
(* Goal: @Perp_at Tn B A B B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_in_comm.
(* Goal: @Perp_at Tn B B A C B *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_perp_in.
(* Goal: @Perp Tn B A C B *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_comm.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_not_eq_2 in H0.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Per Tn P P B *)
(* Goal: a P B P *)
          apply l8_2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
        intro.
(* Goal: False *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
        subst C'.
(* Goal: False *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply H12.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        unfold Q_CongA_Null_Acute.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
        split; auto.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
        intros.
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(CongA A0 B0 C0 B' A' B').
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply (anga_conga a); auto.
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply (l11_21_a B' A' B') .
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply out_trivial; auto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
        apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
      assert(Cong C B C' B' /\ Cong A B A' B' /\ CongA B C A B' C' A').
(* Goal: and (@Cong Tn C B C' B') (and (@Cong Tn A B A' B') (@CongA Tn B C A B' C' A')) *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply(l11_50_2 C A B C' A' B').
(* Goal: not (@Col Tn C A B) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_comm in H0.
(* Goal: not (@Col Tn C A B) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_not_col in H0.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
          intro.
(* Goal: False *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply H0.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          Col.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          apply conga_comm.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Cong Tn A2 B2 A1 B1 *)
        Cong.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (lg_cong_lg lp A' B');auto.
(* Goal: @Cong Tn A2 B2 A1 B1 *)
      Cong.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    assumption.
Qed.

Lemma l13_7 : forall a b l la lb lab lba, Lcos la l a -> Lcos lb l b ->
  Lcos lab la b -> Lcos lba lb a -> EqL lab lba.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H0.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @EqL Tn lab lba *)
    clean_duplicated_hyps.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
    induction (is_null_anga_dec a).
      assert(HH:=null_lcos_eql lba lb  a H2 H3).
      assert(HP:=null_lcos_eql la l  a H H3).
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn a *)
      assert(Lcos lab l b) by (rewrite HP;assumption).
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn a *)
      assert(HQ:= l13_6 b lb lab l H0 H5).
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      rewrite <- HQ;assumption.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn a *)
      induction (is_null_anga_dec b).
        assert(HH:=null_lcos_eql lab la  b H1 H5).
        assert(HP:=null_lcos_eql lb l  b H0 H5).
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(Lcos lba l a) by (rewrite HP;auto).
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HQ:= l13_6 a la lba l H H6).
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
        rewrite HH in HQ;assumption.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HH:=lcos_const la l a H).
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        ex_and HH C.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        ex_and H6 A.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        ex_and H8 B.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HH:= anga_distincts a C A B H14 H9).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        spliter.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(~Col A B C).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
          intro.
(* Goal: False *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply H3.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(Col C A B).
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
            Col.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(HH:= anga_col_null a C A B H14 H9 H18).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HH:=l10_2_existence B A C).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        ex_and HH P.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert( ~ Col B A P).
(* Goal: not (@Col Tn B A P) *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          eapply (osym_not_col _ _ C).
(* Goal: @Reflect Tn C P B A *)
(* Goal: not (@Col Tn B A C) *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply l10_4.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
          intro.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply H17.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          Col.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(l B A).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply lg_sym; auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HH:= lcos_const_o lb l b B A P H19 H5 H12 H10 H11 H20 H0).
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        ex_and HH D.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(TS B A P C).
(* Goal: @TS Tn B A P C *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply l10_14.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
            intro.
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            subst P.
(* Goal: False *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            assert(Col C B A).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              apply(l10_8 B A C); auto.
(* Goal: False *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply H19.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
            Col.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(TS B A D C).
(* Goal: @TS Tn B A D C *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          eapply (l9_8_2 _ _ P).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @OS Tn B A P D *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply one_side_symmetry.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(Per A C B).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply (lcos_per _ _ _ la l a); auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply lg_sym; auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(Per A D B).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply (lcos_per _ _ _ lb l b); auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply anga_sym; auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(~ Col C D A).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
          intro.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(Per B C D).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            apply(per_col B C A D); auto.
(* Goal: @Per Tn P P B *)
(* Goal: a P B P *)
              apply l8_2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              auto.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
            Col.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(Per B D C).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            apply(per_col B D A C); auto.
(* Goal: not (@eq (@Tpoint Tn) D A) *)
(* Goal: @Per Tn B D A *)
(* Goal: @Col Tn D A C *)
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
              unfold OS in H21.
(* Goal: not (@eq (@Tpoint Tn) D A) *)
(* Goal: @Per Tn B D A *)
(* Goal: @Col Tn D A C *)
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
              ex_and H21 T.
(* Goal: not (@eq (@Tpoint Tn) D A) *)
(* Goal: @Per Tn B D A *)
(* Goal: @Col Tn D A C *)
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
              unfold TS in H21.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              spliter.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
              intro.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
              subst D.
(* Goal: False *)
(* Goal: @Per Tn B D A *)
(* Goal: @Col Tn D A C *)
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
              apply H21.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
              Col.
(* Goal: @Per Tn P P B *)
(* Goal: a P B P *)
              apply l8_2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              auto.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
            Col.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(C = D).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            apply (l8_7 B); auto.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          subst D.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          unfold TS in H25.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          spliter.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          ex_and H32 T.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(C=T).
(* Goal: @eq (@Tpoint Tn) C T *)
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply between_identity.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: False *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          subst T.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          contradiction.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HH:= l8_18_existence C D A H28).
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        ex_and HH E.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(CongA B A C D A E /\ CongA B A D C A E /\ Bet C E D).
(* Goal: and (@CongA Tn B A C D A E) (and (@CongA Tn B A D C A E) (@Bet Tn C E D)) *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply(l13_2 A B C D E).
(* Goal: @TS Tn A B C D *)
(* Goal: @Per Tn B C A *)
(* Goal: @Per Tn B D A *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply invert_two_sides.
(* Goal: @TS Tn B A C D *)
(* Goal: @Per Tn B C A *)
(* Goal: @Per Tn B D A *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply l9_2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Per Tn P P B *)
(* Goal: a P B P *)
            apply l8_2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Per Tn P P B *)
(* Goal: a P B P *)
            apply l8_2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Perp Tn P A B P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        spliter.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(a D A E).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          eapply (anga_conga_anga a B A C); auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply anga_sym; auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(b C A E).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          eapply (anga_conga_anga b B A D); auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(Perp C E A E).
(* Goal: @Perp Tn C E A E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          eapply (perp_col _ D) .
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
            intro.
(* Goal: False *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            subst E.
(* Goal: False *)
(* Goal: @Out Tn B C P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply H5.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            unfold Q_CongA_Null_Acute.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
            split; auto.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
            intros.
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @Col Tn C D E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            assert(CongA A0 B0 C0 C A C).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              apply (anga_conga b); auto.
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @Col Tn C D E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply (l11_21_a C A C A0 B0 C0 ).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              apply out_trivial; auto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
            apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(lab A E).
(* Goal: lab A E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply (lcos_lg b lab la A E C H1).
(* Goal: @Perp Tn A E E C *)
(* Goal: b E A C *)
(* Goal: la A C *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply perp_sym in H36.
(* Goal: @Perp Tn A E E C *)
(* Goal: b E A C *)
(* Goal: la A C *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply perp_right_comm in H36.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            apply anga_sym; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply lg_sym; auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(Perp D E A E).
(* Goal: @Perp Tn D E A E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          eapply (perp_col _ C) .
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
            intro.
(* Goal: False *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            subst E.
(* Goal: False *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply H3.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            unfold Q_CongA_Null_Acute.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
            split; auto.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
            intros.
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            assert(CongA A0 B0 C0 D A D).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              apply (anga_conga a); auto.
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply (l11_21_a D A D A0 B0 C0 ).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              apply out_trivial; auto.
(* Goal: not (@eq (@Tpoint Tn) D A) *)
(* Goal: @CongA Tn D A D A0 B0 C0 *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Col Tn D C E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
              apply perp_not_eq_2 in H36.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              auto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
            apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            Perp.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          Col.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(lba A E).
(* Goal: lba A E *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply (lcos_lg a lba lb A E D).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            Perp.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            apply anga_sym; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        apply ex_eql.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
        exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (@Len Tn A B lab) (@Len Tn A B lba)) *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        exists E.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
        split.
(* Goal: @Len Tn A E lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
          unfold Len.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
          split; auto.
(* Goal: @Len Tn A E lba *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA_Acute Tn a *)
        unfold Len.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
        split; auto.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      assumption.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    assumption.
Qed.

Lemma out_acute : forall A B C, Out B A C -> Acute A B C.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Acute Tn A B C *)
    assert( A <> B /\ C <> B).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
(* Goal: @Acute Tn A B C *)
      unfold Out in H.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      tauto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Acute Tn A B C *)
    assert(HH:= not_col_exists A B H0).
(* Goal: @Acute Tn A B C *)
    ex_and HH Q.
(* Goal: @Acute Tn A B C *)
    assert(exists P : Tpoint, Perp A B P B /\ OS A B Q P).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Perp Tn A B P B) (@OS Tn A B Q P)) *)
(* Goal: @Acute Tn A B C *)
      apply(l10_15 A B B Q).
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        Col.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Acute Tn A B C *)
    ex_and H3 P.
(* Goal: @Acute Tn A B C *)
    assert(Per P B A).
(* Goal: @Per Tn A B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_in_per.
(* Goal: False *)
(* Goal: @Out Tn B A C *)
      apply perp_left_comm in H3.
(* Goal: @Perp_at Tn B A B B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_in_comm.
(* Goal: @Perp_at Tn B B A C B *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply perp_perp_in.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      Perp.
(* Goal: @Acute Tn A B C *)
    unfold Acute.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
    exists B.
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B0 B) (and (lp B B0) (and (l B C) (a B0 B C))))) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    exists P.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Per Tn P P B *)
(* Goal: a P B P *)
      apply l8_2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @LtA Tn A B C A B P *)
    unfold LtA.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @LeA Tn A B C A' B' C' *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      unfold LeA.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
      exists C.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
      split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply col_in_angle; auto.
(* Goal: not (@eq (@Tpoint Tn) P B) *)
(* Goal: @CongA Tn A B C A B C *)
(* Goal: not (@CongA Tn A B C A B P) *)
        apply perp_not_eq_2 in H3.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply conga_refl; auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: False *)
    apply l11_21_a in H6.
(* Goal: False *)
(* Goal: @Out Tn B A C *)
      apply perp_left_comm in H3.
(* Goal: False *)
(* Goal: @Out Tn B A C *)
      apply perp_not_col in H3.
(* Goal: False *)
(* Goal: @Out Tn B A C *)
      apply out_col in H6.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      contradiction.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    assumption.
Qed.



Lemma perp_acute : forall A B C P,  Col A C P -> Perp_at P B P A C -> Acute A B P.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(HH0:=H0).
(* Goal: @Acute Tn A B P *)
    assert(HH:= l11_43 P A B).
(* Goal: @Acute Tn A B P *)
    induction(col_dec P A B).
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      assert(Perp B A A C).
(* Goal: @Perp Tn B A A C *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
        eapply (perp_col _ P).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
          intro.
(* Goal: False *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
          subst A.
(* Goal: False *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
          assert(Perp_at B B P C B).
(* Goal: @Perp_at Tn B B A C B *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply perp_perp_in.
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
            apply perp_in_perp_bis in H0.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
            induction H0.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
              apply perp_not_eq_1 in H0.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              tauto.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            Perp.
(* Goal: False *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
          assert(P=B).
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            eapply(l8_14_3 B P B C); Perp.
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          subst P.
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
          apply perp_in_perp_bis in H0.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
          induction H0.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
            apply perp_not_eq_1 in H0.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            tauto.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
          apply perp_not_eq_1 in H0.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          tauto.
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
          apply perp_in_perp_bis in H0.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
          induction H0.
(* Goal: @Perp Tn B P A C *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Col Tn B P A *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
            apply perp_not_eq_1 in H0.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            tauto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        Col.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      apply perp_comm in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      apply perp_perp_in in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      apply perp_in_comm in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      apply perp_in_sym in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
      eapply (perp_in_col_perp_in _ _ _ _ P) in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
        assert( A = P).
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          eapply(l8_14_3 A C B P); Perp.
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        subst P.
(* Goal: @Acute Tn A B A *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
        apply out_acute.
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
        apply perp_in_perp_bis in H2.
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
        induction H2.
(* Goal: @Out Tn A1 B1 B1 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
          apply out_trivial.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
          apply perp_not_eq_2 in H2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
        apply perp_not_eq_1 in H2.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        tauto.
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Col Tn B A P *)
(* Goal: @Acute Tn A B P *)
        apply perp_in_perp_bis in H0.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        induction H0; apply perp_not_eq_1 in H0; tauto.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      Col.
(* Goal: @Acute Tn C B A *)
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    apply acute_sym.
(* Goal: @Acute Tn P B A *)
    assert_diffs.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply l11_43; auto.
(* Goal: or (@Per Tn A P B) (@Obtuse Tn A P B) *)
    left.
(* Goal: @Per Tn A P B *)
    assert(A <> P).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
      subst P.
(* Goal: False *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply H1.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
      Col.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    eapply (perp_in_col_perp_in _ _ _ _ P) in H0; auto.
(* Goal: @Per Tn A B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    apply perp_in_per.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    Perp.
Qed.

Lemma null_lcos : forall l a,Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Null_Acute a -> Lcos l l a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos Tn l l a *)
    unfold Q_CongA_Null_Acute in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos Tn l l a *)
    assert(HH:=ex_points_anga a H1).
(* Goal: @Lcos Tn l l a *)
    ex_and HH A.
(* Goal: @Lcos Tn l l a *)
    ex_and H3 B.
(* Goal: @Lcos Tn l l a *)
    ex_and H4 C.
(* Goal: @Lcos Tn l l a *)
    assert(HH:=H2 A B C H3).
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    unfold Lcos.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
    assert(B <> A).
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
      unfold Out in HH.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
    lg_instance l A' B'.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
    assert(HP:=ex_point_lg_out l B A H4 H H0).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
    ex_and HP P.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
    exists B.
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B0 B) (and (lp B B0) (and (l B C) (a B0 B C))))) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    exists P.
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B0 B) (and (lp B B0) (and (l B C) (a B0 B C))))) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
    exists P.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @Per Tn P P B *)
(* Goal: a P B P *)
      apply l8_2.
(* Goal: @Per Tn B P P *)
(* Goal: a P B P *)
      apply l8_5.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (anga_out_anga _ A _ C); auto.
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
      apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Out Tn B C P *)
    apply (out2_out_2 _ _ _ A).
(* Goal: @Out Tn B C A *)
(* Goal: @Out Tn B P A *)
      apply l6_6.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma lcos_exists : forall l a, Q_CongA_Acute a -> Q_Cong l -> ~ Q_Cong_Null l -> exists lp, Lcos lp l a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
    lg_instance l A B.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
    induction(is_null_anga_dec a).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (@Lcos Tn lb la b)) *)
      exists l.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply null_lcos; auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: @Q_CongA_Acute Tn a *)
      anga_instance1 a A B C.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(~ Col B C A).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
          intro.
(* Goal: False *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(Out B A C /\ Q_CongA_Null_Acute a).
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: False *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply(anga_col_null a A B C H H4).
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
            Col.
(* Goal: False *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply H3.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          tauto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HH:= l8_18_existence B C A H5).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        ex_and HH P.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HH:=lg_exists B P).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
        ex_and HH lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
        exists lp.
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(Acute A B C).
(* Goal: @Acute Tn A B C *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          unfold Q_CongA_Acute in H.
(* Goal: @Acute Tn A B C *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          ex_and H A'.
(* Goal: @Acute Tn A B C *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          ex_and H10 B'.
(* Goal: @Acute Tn A B C *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          ex_and H C'.
(* Goal: @Acute Tn A B C *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(HH:=H10 A B C).
(* Goal: @Lcos3 Tn lp l a c b *)
          destruct HH.
(* Goal: @Acute Tn A B C *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          assert(HP:= H12 H4).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply (acute_lea_acute _ _ _ A' B' C'); auto.
(* Goal: @LeA Tn A B C A' B' C' *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          unfold LeA.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A' B' C') (@CongA Tn A B C A' B' P)) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          exists C'.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
          split.
(* Goal: @InAngle Tn C' A' B' C' *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply inangle3123.
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
              apply conga_distinct in HP.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
              tauto.
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply conga_distinct in HP.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
            tauto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
          apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Lcos Tn lp l a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        unfold Lcos.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
        repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
        exists B.
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B0 B) (and (lp B B0) (and (l B C) (a B0 B C))))) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        exists P.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
        exists A.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
        repeat split; auto.
(* Goal: @Per Tn A B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_in_per.
(* Goal: @Perp_at Tn B A B B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_in_comm.
(* Goal: @Perp_at Tn B B A C B *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_perp_in.
(* Goal: @Perp Tn P A B P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply perp_sym.
(* Goal: @Perp Tn B P P A *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply (perp_col _ C).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
            intro.
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            subst P.
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            assert(Per A B C).
(* Goal: @Per Tn A B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
              apply perp_in_per.
(* Goal: @Perp_at Tn B A B B C *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
              apply perp_in_comm.
(* Goal: @Perp_at Tn B B A C B *)
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
              apply perp_perp_in.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
              Perp.
(* Goal: False *)
(* Goal: @Perp Tn B C P A *)
(* Goal: @Col Tn B C P *)
(* Goal: l B A *)
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            apply acute_not_per in H10.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
            contradiction.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
            Perp.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          Col.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          apply (lg_sym l); auto.
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        assert(HH:=H10).
(* Goal: a P B A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        unfold Acute in HH.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply(anga_sym a); auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
        apply(anga_out_anga a A B C A P); auto.
(* Goal: @Out Tn A1 B1 B1 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
          apply out_trivial.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
          intro.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_CongA_Acute Tn a *)
          subst B.
(* Goal: False *)
(* Goal: @Out Tn B C P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply H5.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
          Col.
(* Goal: @Out Tn B C P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
        eapply (perp_acute_out _ _ A).
(* Goal: @Acute Tn C B A *)
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          apply acute_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
          auto.
(* Goal: @Perp Tn C B A P *)
(* Goal: @Col Tn C B P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Q_CongA_Acute Tn a *)
          Perp.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
        Col.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: False *)
(* Goal: @Q_CongA_Acute Tn a *)
      apply H1.
(* Goal: @Q_Cong_Null Tn l *)
(* Goal: @Q_CongA_Acute Tn a *)
      unfold Q_Cong_Null.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_CongA_Acute Tn a *)
      subst B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
      exists A.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    assumption.
Qed.


Lemma lcos_uniqueness : forall l a l1 l2, Lcos l1 l a-> Lcos l2 l a -> EqL l1 l2.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
intros.
(* Goal: @Lcos Tn lp l b *)
unfold Lcos in *.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
spliter.
(* Goal: @EqL Tn l1 l2 *)
ex_and H6 A1.
(* Goal: @EqL Tn l1 l2 *)
ex_and H7 B1.
(* Goal: @EqL Tn l1 l2 *)
ex_and H6 C1.
(* Goal: @EqL Tn l1 l2 *)
ex_and H3 A2.
(* Goal: @EqL Tn l1 l2 *)
ex_and H10 B2.
(* Goal: @EqL Tn l1 l2 *)
ex_and H3 C2.

(* Goal: @EqL Tn l1 l2 *)
assert(Cong A1 C1 A2 C2).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply (lg_cong l); auto.

(* Goal: @EqL Tn l1 l2 *)
assert(CongA B1 A1 C1 B2 A2 C2).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply (anga_conga a); auto.

(* Goal: @EqL Tn l1 l2 *)
induction(eq_dec_points C1 B1).
(* Goal: False *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
subst C1.

(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(EqL l l1).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply ex_eqL; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l1 A B) (l2 A B))) *)
exists A1.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l1 A1 B) (l2 A1 B)) *)
exists B1.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
split; auto.

(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(Out A2 B2 C2).
(* Goal: @Out Tn A2 B2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
apply (l11_21_a B1 A1 B1).
(* Goal: @Out Tn A1 B1 B1 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
apply out_trivial.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
intro.
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
subst B1.
(* Goal: @EqL Tn l1 l2 *)
apply conga_distinct in H14.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
tauto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
auto.

(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(C2 = B2 \/ A2 = B2).
(* Goal: or (@eq (@Tpoint Tn) C2 B2) (@eq (@Tpoint Tn) A2 B2) *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
apply(l8_9 C2 B2 A2).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
auto.
(* Goal: @Col Tn C2 B2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
apply out_col in H16.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
Col.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
induction H17.
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
subst C2.

(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(EqL l l2).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply ex_eqL; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (l2 A B))) *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
exists A2.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A2 B) (l2 A2 B)) *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
exists B2.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
split; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
transitivity l; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
symmetry; auto.

(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
subst B2.
(* Goal: @EqL Tn l1 l2 *)
apply conga_distinct in H14.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
tauto.

(* Goal: @EqL Tn l1 l2 *)
apply conga_distinct in H14.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
spliter.
(* Goal: @EqL Tn l1 l2 *)
assert(CongA C1 B1 A1 C2 B2 A2).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply l11_16; auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
intro.
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
subst C2.

(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
assert(Out A1 B1 C1).
(* Goal: @Out Tn A1 B1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
apply (l11_21_a B2 A2 B2).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply out_trivial; auto.
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
apply conga_sym.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
auto.
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(C1 = B1 \/ A1 = B1).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply(l8_9 C1 B1 A1 ); auto.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
apply out_col in H20.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
Col.
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
induction H21.
(* Goal: False *)
(* Goal: False *)
(* Goal: @EqL Tn l1 l2 *)
subst C1.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
tauto.
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
subst B1.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
tauto.

(* Goal: @EqL Tn l1 l2 *)
assert( Cong C1 B1 C2 B2 /\ Cong A1 B1 A2 B2 /\ CongA B1 C1 A1 B2 C2 A2).
(* Goal: and (@Cong Tn C1 B1 C2 B2) (and (@Cong Tn A1 B1 A2 B2) (@CongA Tn B1 C1 A1 B2 C2 A2)) *)
(* Goal: @EqL Tn l1 l2 *)
apply(l11_50_2 C1 A1 B1 C2 A2 B2).
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
intro.
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(C1 = B1 \/ A1 = B1).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply(l8_9 C1 B1 A1 ); auto.
(* Goal: @Col Tn C1 B1 A1 *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
Col.
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
induction H22.
(* Goal: False *)
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
contradiction.
(* Goal: False *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
subst B1.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
tauto.
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
apply conga_comm.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
auto.
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @EqL Tn l1 l2 *)
apply conga_comm.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
auto.
(* Goal: @Cong Tn A2 B2 A1 B1 *)
Cong.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
spliter.

(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply ex_eqL; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l1 A B) (l2 A B))) *)
exists A1.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l1 A1 B) (l2 A1 B)) *)
exists B1.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
split; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply (lg_cong_lg l2 A2 B2); auto.
(* Goal: @Cong Tn A2 B2 A1 B1 *)
Cong.
Qed.

Lemma lcos_eqa_lcos : forall lp l a b, Lcos lp l a -> EqA a b -> Lcos lp l b.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos Tn lp l b *)
    assert(HH:=lcos_lg_anga l lp a H).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos Tn lp l b *)
    clear H1.
(* Goal: @Lcos Tn lp l b *)
    assert(HH:= H0).
(* Goal: @Lcos Tn lp l b *)
    unfold EqA in HH.
(* Goal: @Lcos Tn lp l b *)
    assert (Q_CongA a) by (apply anga_is_ang;auto).
(* Goal: @Lcos Tn lp l b *)
    assert (Q_CongA b) by (apply eqA_preserves_ang with a;auto).
(* Goal: @Lcos Tn lp l b *)
    assert (Q_CongA_Acute b).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (eqA_preserves_anga a b); auto.
(* Goal: @Lcos Tn lp l b *)
    unfold Lcos in *.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    ex_and H9 A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    ex_and H10 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    ex_and H9 C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
    exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
    exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
    exists C.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    repeat split; auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply HH;auto.
Qed.

Lemma lcos_eq_refl : forall la a, Q_Cong la -> ~ Q_Cong_Null la -> Q_CongA_Acute a -> Eq_Lcos la a la a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos Tn la a la a *)
    unfold Eq_Lcos.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp la a)) *)
    assert(HH:=lcos_exists la a H1 H H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos_eq_sym : forall la a lb b, Eq_Lcos la a lb b -> Eq_Lcos lb b la a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos Tn la a lc c *)
    unfold Eq_Lcos in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
    ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos_eq_trans : forall la a lb b lc c, Eq_Lcos la a lb b -> Eq_Lcos lb b lc c -> Eq_Lcos la a lc c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos Tn la a lc c *)
    unfold Eq_Lcos in *.
(* Goal: @Lcos3 Tn lp l a b c *)
    ex_and H lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
    ex_and H0 lbc.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
    assert(HH:= l13_6 b lab lbc lb H1 H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
    assert(Lcos lbc la a).
      rewrite <- HH.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
      apply lcos_lg_anga in H.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      tauto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
    exists lbc.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos2_comm : forall lp l a b, Lcos2 lp l a b -> Lcos2 lp l b a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos2 Tn lb llb a b *)
    unfold Lcos2 in *.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H la.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H0.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
    assert(exists lb, Lcos lb l b).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply(lcos_exists l b); auto.
(* Goal: not (@Q_Cong_Null Tn l) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
      assert(HH:= lcos_lg_not_null la l a H).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      tauto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
    ex_and H7 lb.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
    apply lcos_lg_anga in H8.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
    exists lb.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos Tn lp lb a *)
    assert(exists lp', Lcos lp' lb a).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply(lcos_exists lb a); auto.
(* Goal: not (@Q_Cong_Null Tn lb) *)
(* Goal: @Lcos Tn lp lb a *)
      assert(HH:= lcos_lg_not_null lb l b H7).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      tauto.
(* Goal: @Lcos Tn lp lb a *)
    ex_and H11 lp'.
(* Goal: @Lcos Tn lp lb a *)
    assert(EqL lp lp').
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply(l13_7 a b l la lb lp lp'); auto.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H12.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    rewrite H11. tauto.
Qed.

Lemma lcos2_exists : forall l a b, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b -> 
 exists lp, Lcos2 lp l a b.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    assert(HH:= lcos_exists l a H1 H H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH la.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H3.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    assert(~ Q_Cong_Null la /\ ~ Q_Cong_Null l).
(* Goal: and (not (@Q_Cong_Null Tn lp)) (not (@Q_Cong_Null Tn la)) *)
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
      apply (lcos_lg_not_null _ _ a).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
    clear H8.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
    assert(HH:= lcos_exists la b H2 H5 H7).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
    exists lab.
(* Goal: @Lcos2 Tn lab l a b *)
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    unfold Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    exists la.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos2_exists' : forall l a b, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b ->
 exists la, exists lab, Lcos la l a /\ Lcos lab la b.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    assert(HH:=lcos_exists l a H1 H H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    exists la.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H3.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
    assert(HP:=lcos_not_lg_null la l a H3).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
    assert(HH:=lcos_exists la b H2 H5 HP).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
    exists lab.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos2_eq_refl : forall l a b, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b -> Eq_Lcos2 l a b l a b.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos2 Tn l a b l a b *)
    assert(HH:= lcos2_exists l a b H H0 H1 H2).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH lab.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
    unfold Eq_Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
    exists lab.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos2_eq_sym : forall l1 a b l2 c d, Eq_Lcos2 l1 a b l2 c d -> Eq_Lcos2 l2 c d l1 a b.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos2 Tn l1 a b l3 e f *)
    unfold Eq_Lcos2 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
    ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma lcos2_uniqueness: forall l l1 l2 a b, Lcos2 l1 l a b -> Lcos2 l2 l a b -> EqL l1 l2.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos2 Tn lb llb a b *)
    unfold Lcos2 in *.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H la.
(* Goal: @EqL Tn l1 l2 *)
    ex_and H0 lb.
(* Goal: @EqL Tn l1 l2 *)
    assert(EqL la lb).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (l13_6 a _ _ l); auto.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H2.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @EqL Tn l1 l2 *)
    assert(Lcos l2 la b).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      rewrite H3;auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (l13_6 b _ _ la); auto.
Qed.

Lemma lcos2_eql_lcos2 : forall lla llb la lb a b, Lcos2 la lla a b -> EqL lla llb -> EqL la lb -> Lcos2 lb llb a b.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos2 Tn lb llb a b *)
    unfold Lcos2 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (@Lcos Tn lb la b)) *)
    ex_and H l.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (@Lcos Tn lb la b)) *)
    exists l.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    rewrite <- H0;auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    rewrite <- H1;auto.
Qed.

Lemma lcos2_lg_anga : forall lp l a b, Lcos2 lp l a b -> Lcos2 lp l a b /\ Q_Cong lp /\ Q_Cong l /\ Q_CongA_Acute a /\ Q_CongA_Acute b.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    unfold Lcos2 in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b))) *)
    ex_and H ll.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H0.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos2_eq_trans : forall l1 a b l2 c d l3 e f, Eq_Lcos2 l1 a b l2 c d -> Eq_Lcos2 l2 c d l3 e f
                                   -> Eq_Lcos2 l1 a b l3 e f.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos2 Tn l1 a b l3 e f *)
    unfold Eq_Lcos2 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
    ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
    ex_and H0 lq.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
(* Goal: @Lcos3 Tn lp l3 g h i *)
    assert(EqL lp lq).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      eapply (lcos2_uniqueness l2 _ _ c d); auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply lcos2_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply lcos2_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    eapply (lcos2_eql_lcos2 l3 _ lq); auto.
(* Goal: @EqL Tn l3 l3 *)
(* Goal: @EqL Tn lq lp *)
      reflexivity.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    symmetry; auto.
Qed.

Lemma lcos_eq_lcos2_eq : forall la lb a b c, Q_CongA_Acute c -> Eq_Lcos la a lb b -> Eq_Lcos2 la a c lb b c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(HH0:=H0).
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
    unfold Eq_Lcos in HH0.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    ex_and HH0 lp.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    clear H7.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    assert(~ Q_Cong_Null lp /\ ~ Q_Cong_Null la).
(* Goal: and (not (@Q_Cong_Null Tn lp)) (not (@Q_Cong_Null Tn la)) *)
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
      apply (lcos_lg_not_null _ _ a).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
    unfold Eq_Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp la a c) (@Lcos2 Tn lp lb b c)) *)
    assert(HH:= lcos_exists lp c H H4 H7).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    ex_and HH lq.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp la a b e) (@Lcos3 Tn lp lb c d e)) *)
    exists lq.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lab l a b *)
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      unfold Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
      exists lp.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
(* Goal: @Lcos2 Tn lab l a b *)
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    unfold Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos2_lg_not_null: forall lp l a b, Lcos2 lp l a b -> ~ Q_Cong_Null l /\ ~ Q_Cong_Null lp.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    unfold Lcos2 in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H la.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    apply lcos_lg_not_null in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    apply lcos_lg_not_null in H0.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos3_lcos_1_2 : forall lp l a b c, Lcos3 lp l a b c <-> exists la, Lcos la l a /\ Lcos2 lp la b c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
      unfold Lcos3 in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
      ex_and H la.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
      ex_and H0 lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
      exists la.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
(* Goal: @Lcos2 Tn lab l a b *)
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      unfold Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
      exists lab.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H la.
(* Goal: @Lcos3 Tn lp l a b c *)
    unfold Lcos2 in H0.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H0 lab.
(* Goal: @Lcos3 Tn lp l a b c *)
    unfold Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    exists la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
    exists lab.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H0.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos3_lcos_2_1 : forall lp l a b c, Lcos3 lp l a b c <-> exists lab, Lcos2 lab l a b /\ Lcos lp lab c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      intro.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
      unfold Lcos3 in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
      ex_and H la.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
      ex_and H0 lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
      exists lab.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
      split.
(* Goal: @Lcos2 Tn lab l a b *)
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
        unfold Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
        exists la.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
        split; assumption.
(* Goal: @Lcos Tn lp lab c *)
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
      assumption.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
    intro.
(* Goal: @Lcos3 Tn lp l a b c *)
    ex_and H lab.
(* Goal: @Lcos3 Tn lp l a b c *)
    unfold Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    unfold Lcos2 in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    exists la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
    exists lab.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.


Lemma lcos3_permut3 : forall lp l a b c, Lcos3 lp l a b c -> Lcos3 lp l b a c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos3 Tn lp l b a c *)
    assert(HH:= lcos3_lcos_2_1 lp l a b c).
(* Goal: @Lcos3 Tn lp l a c b *)
    destruct HH.
    assert(exists lab : Tpoint -> Tpoint -> Prop, Lcos2 lab l a b /\ Lcos lp lab c).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply lcos3_lcos_2_1; auto.
(* Goal: @Lcos3 Tn lp l b a c *)
    ex_and H2 lab.
(* Goal: @Lcos3 Tn lp l b a c *)
    apply lcos2_comm in H2.
(* Goal: @Lcos3 Tn lp l b a c *)
    apply lcos3_lcos_2_1.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
    exists lab.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.


Lemma lcos3_permut1 : forall lp l a b c, Lcos3 lp l a b c -> Lcos3 lp l a c b.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos3 Tn lp l a c b *)
    assert(HH:= lcos3_lcos_1_2 lp l a b c).
(* Goal: @Lcos3 Tn lp l a c b *)
    destruct HH.
    assert(exists la : Tpoint -> Tpoint -> Prop, Lcos la l a /\ Lcos2 lp la b c).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply lcos3_lcos_1_2; auto.
(* Goal: @Lcos3 Tn lp l a c b *)
    ex_and H2 la.
(* Goal: @Lcos3 Tn lp l a c b *)
    apply lcos2_comm in H3.
(* Goal: @Lcos3 Tn lp l a c b *)
    apply lcos3_lcos_1_2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    exists la.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos3_permut2 : forall lp l a b c, Lcos3 lp l a b c -> Lcos3 lp l c b a.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos3 Tn lp l b a c *)
    apply lcos3_permut3.
(* Goal: @Lcos3 Tn lp l b c a *)
    apply lcos3_permut1.
(* Goal: @Lcos3 Tn lp l b a c *)
    apply lcos3_permut3.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma lcos3_exists : forall l a b c, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b -> Q_CongA_Acute c ->
 exists lp, Lcos3 lp l a b c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    assert(HH:= lcos_exists l a H1 H H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH la.
(* Goal: @EqL Tn l1 l2 *)
    apply lcos_lg_anga in H4.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    assert(~ Q_Cong_Null la /\ ~ Q_Cong_Null l).
(* Goal: and (not (@Q_Cong_Null Tn lp)) (not (@Q_Cong_Null Tn la)) *)
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
      apply (lcos_lg_not_null _ _ a).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    clear H9.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    clear H7.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    assert(HH:= lcos_exists la b H2 H6 H8).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    apply lcos_lg_anga in H7.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    assert(~ Q_Cong_Null lab /\ ~ Q_Cong_Null la).
(* Goal: and (not (@Q_Cong_Null Tn lab)) (not (@Q_Cong_Null Tn la)) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
      apply (lcos_lg_not_null _ _ b).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    assert(HH:= lcos_exists lab c H3 H10 H12).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: @Lcos3 Tn lp l a b c *)
    unfold Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
    exists la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
    exists lab.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    split;auto.
Qed.

(*----------------------------------------*)

Lemma lcos3_eq_refl : forall l a b c, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b -> Q_CongA_Acute c -> Eq_Lcos3 l a b c l a b c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
    assert(HH:= lcos3_exists l a b c H H0 H1 H2 H3).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
    ex_and HH lp.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    unfold Eq_Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos3_eq_sym : forall l1 a b c l2 d e f, Eq_Lcos3 l1 a b c l2 d e f -> Eq_Lcos3 l2 d e f l1 a b c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos3 Tn l1 a b c l3 g h i *)
    unfold Eq_Lcos3 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
    ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    auto.
Qed.

Lemma lcos3_uniqueness: forall l l1 l2 a b c, Lcos3 l1 l a b c -> Lcos3 l2 l a b c -> EqL l1 l2.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos3 Tn lb llb a b c *)
    unfold Lcos3 in *.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H la.
(* Goal: @EqL Tn l1 l2 *)
    ex_and H1 lab.
(* Goal: @EqL Tn l1 l2 *)
    ex_and H0 la'.
(* Goal: @EqL Tn l1 l2 *)
    ex_and H3 lab'.
(* Goal: @EqL Tn l1 l2 *)
    assert(EqL la la').
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (l13_6 a _ _ l); auto.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H3.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H.
(* Goal: @EqL Tn l1 l2 *)
    apply lcos_lg_anga in H4.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @EqL Tn l1 l2 *)
    assert(Lcos lab' la b).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      rewrite H5;auto.
    assert(EqL lab lab') by
      (apply (l13_6 b _ _ la); auto).
(* Goal: @EqL Tn l1 l2 *)
    assert(Lcos l2 lab c).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      rewrite H19. auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply (l13_6 c _ _ lab); auto.
Qed.


Lemma lcos3_eql_lcos3 : forall lla llb la lb a b c, Lcos3 la lla a b c -> EqL lla llb -> EqL la lb -> Lcos3 lb llb a b c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Lcos3 Tn lb llb a b c *)
    unfold Lcos3 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (and (@Lcos Tn lab la b) (@Lcos Tn lb lab c)))) *)
    ex_and H lpa.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (and (@Lcos Tn lab la b) (@Lcos Tn lb lab c)))) *)
    exists lpa.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lpa llb a) (and (@Lcos Tn lab lpa b) (@Lcos Tn lb lab c))) *)
    ex_and H2 lpab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lpa llb a) (and (@Lcos Tn lab lpa b) (@Lcos Tn lb lab c))) *)
    exists lpab.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H3.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    rewrite <- H0;auto.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
    split.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    rewrite <- H1;auto.
Qed.

Lemma lcos3_lg_anga : forall lp l a b c, Lcos3 lp l a b c -> Lcos3 lp l a b c /\ Q_Cong lp /\ Q_Cong l /\ Q_CongA_Acute a /\ Q_CongA_Acute b /\ Q_CongA_Acute c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    unfold Lcos3 in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H la.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H0 lab.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H0.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
    apply lcos_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos3_lg_not_null: forall lp l a b c, Lcos3 lp l a b c -> ~ Q_Cong_Null l /\ ~ Q_Cong_Null lp.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    unfold Lcos3 in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H la.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    ex_and H0 lab.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    apply lcos_lg_not_null in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
    apply lcos_lg_not_null in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos3_eq_trans : forall l1 a b c l2 d e f l3 g h i,
 Eq_Lcos3 l1 a b c l2 d e f -> Eq_Lcos3 l2 d e f l3 g h i -> Eq_Lcos3 l1 a b c l3 g h i.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos3 Tn l1 a b c l3 g h i *)
    unfold Eq_Lcos3 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
    ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
    ex_and H0 lq.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
(* Goal: @Lcos3 Tn lp l3 g h i *)
    assert(EqL lp lq).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      eapply (lcos3_uniqueness l2 _ _ d e f); auto.
(* Goal: @Lcos3 Tn lp l3 g h i *)
    apply lcos3_lg_anga in H2.
(* Goal: @Lcos3 Tn lp l3 g h i *)
    apply lcos3_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    eapply (lcos3_eql_lcos3 l3 _ lq); auto.
(* Goal: @EqL Tn l3 l3 *)
(* Goal: @EqL Tn lq lp *)
      reflexivity.
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    symmetry; auto.
Qed.

Lemma lcos_eq_lcos3_eq : forall la lb a b c d, Q_CongA_Acute c -> Q_CongA_Acute d -> Eq_Lcos la a lb b -> Eq_Lcos3 la a c d lb b c d.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    assert(HH1:=H1).
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    unfold Eq_Lcos in HH1.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    ex_and HH1 lp.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H3.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    assert(~ Q_Cong_Null lp /\ ~ Q_Cong_Null la).
(* Goal: and (not (@Q_Cong_Null Tn lp)) (not (@Q_Cong_Null Tn la)) *)
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
      apply (lcos_lg_not_null _ _ a).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    assert(HH:= lcos_exists lp c H H5 H10).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    ex_and HH lq.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    apply lcos_lg_anga in H12.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(~ Q_Cong_Null lq /\ ~ Q_Cong_Null lp).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (lcos_lg_not_null _ _ c); auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    assert(HH:= lcos_exists lq d H0 H14 H16).
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
    ex_and HH lm.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    unfold Eq_Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp la a c d) (@Lcos3 Tn lp lb b c d)) *)
    exists lm.
(* Goal: @Lcos3 Tn lp l a b c *)
    split; unfold Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
      exists lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp la a b e) (@Lcos3 Tn lp lb c d e)) *)
      exists lq.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
      split; auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
    exists lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp la a b e) (@Lcos3 Tn lp lb c d e)) *)
    exists lq.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; auto.
Qed.

Lemma lcos2_eq_lcos3_eq : forall la lb a b c d e, Q_CongA_Acute e -> Eq_Lcos2 la a b lb c d -> Eq_Lcos3 la a b e lb c d e.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
    intros.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(HH0:=H0).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    unfold Eq_Lcos2 in HH0.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    ex_and HH0 lp.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply lcos2_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply lcos2_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(~ Q_Cong_Null la /\ ~ Q_Cong_Null lp).
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lp)) *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      eapply (lcos2_lg_not_null _ _ a b).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(HH:= lcos_exists lp e H H3 H12).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    ex_and HH lq.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    apply lcos_lg_anga in H13.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    assert(~ Q_Cong_Null lq /\ ~ Q_Cong_Null lp).
(* Goal: @Lcos2 Tn lp la a b *)
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
      apply (lcos_lg_not_null _ _ e); auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
    unfold Eq_Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp la a b e) (@Lcos3 Tn lp lb c d e)) *)
    exists lq.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
    split; apply lcos3_lcos_2_1; exists lp; split; auto.
Qed.

End Cosinus2.