reserve AS for AffinSpace;
reserve a,b,c,d,a9,b9,c9,d9,p,q,r,x,y for Element of AS;
reserve A,C,K,M,N,P,Q,X,Y,Z for Subset of AS;

theorem Th24:
  X is being_plane & Y is being_plane & a in X & b in X & a in Y &
  b in Y & X<>Y & a<>b implies X /\ Y is being_line
proof
  assume that
A1: X is being_plane and
A2: Y is being_plane and
A3: a in X & b in X and
A4: a in Y & b in Y and
A5: X<>Y and
A6: a<>b;
  set Z = X /\ Y;
  set Q = Line(a,b);
A7: Q c= X by A1,A3,A6,Th19;
A8: Q c= Y by A2,A4,A6,Th19;
A9: Q is being_line by A6,AFF_1:def 3;
A10: Z c= Q
  proof
    assume not Z c= Q;
    then consider x being object such that
A11: x in Z and
A12: not x in Q;
    reconsider a9=x as Element of AS by A11;
A13: x in Y by A11,XBOOLE_0:def 4;
A14: x in X by A11,XBOOLE_0:def 4;
    for y being object holds y in X iff y in Y
    proof
      let y be object;
A15:  now
        assume
A16:    y in Y;
        now
          reconsider b9=y as Element of AS by A16;
          set M = Line(a9,b9);
A17:      a9 in M by AFF_1:15;
A18:      b9 in M by AFF_1:15;
          assume
A19:      y<>x;
          then
A20:      M is being_line by AFF_1:def 3;
A21:      M c= Y by A2,A13,A16,A19,Th19;
A22:      now
            assume not M // Q;
            then consider q such that
A23:        q in M and
A24:        q in Q by A2,A9,A8,A20,A21,Th22;
            M = Line(a9,q) by A12,A20,A17,A23,A24,AFF_1:57;
            then M c= X by A1,A7,A12,A14,A24,Th19;
            hence y in X by A18;
          end;
          now
            assume M // Q;
            then M c= X by A1,A7,A14,A17,Th23;
            hence y in X by A18;
          end;
          hence y in X by A22;
        end;
        hence y in X by A11,XBOOLE_0:def 4;
      end;
      now
        assume
A25:    y in X;
        now
          reconsider b9=y as Element of AS by A25;
          set M = Line(a9,b9);
A26:      a9 in M by AFF_1:15;
A27:      b9 in M by AFF_1:15;
          assume
A28:      y<>x;
          then
A29:      M is being_line by AFF_1:def 3;
A30:      M c= X by A1,A14,A25,A28,Th19;
A31:      now
            assume not M // Q;
            then consider q such that
A32:        q in M and
A33:        q in Q by A1,A9,A7,A29,A30,Th22;
            M = Line(a9,q) by A12,A29,A26,A32,A33,AFF_1:57;
            then M c= Y by A2,A8,A12,A13,A33,Th19;
            hence y in Y by A27;
          end;
          now
            assume M // Q;
            then M c= Y by A2,A8,A13,A26,Th23;
            hence y in Y by A27;
          end;
          hence y in Y by A31;
        end;
        hence y in Y by A11,XBOOLE_0:def 4;
      end;
      hence thesis by A15;
    end;
    hence contradiction by A5,TARSKI:2;
  end;
  Q c= Z by A7,A8,XBOOLE_1:19;
  hence thesis by A9,A10,XBOOLE_0:def 10;
end;
