reserve V for Z_Module;
reserve W, W1, W2 for Submodule of V;

theorem ThCarrier2:
  for R being Ring
  for V being VectSp of R
  for A1, A2 being Subset of V, l being Linear_Combination of A1 \/ A2
  st A1 /\ A2 = {} holds
  ex l1 being Linear_Combination of A1, l2 being Linear_Combination of A2
  st l = l1 + l2
  proof
    let K be Ring;
    let V be VectSp of K;
    let A1, A2 be Subset of V, l be Linear_Combination of A1 \/ A2 such that
    A1: A1 /\ A2 = {};
    A2: A1 misses A2 by A1;
    defpred P[object, object] means
    $1 is Vector of V implies
    ($1 in A1 & $2 = l.$1) or (not $1 in A1 & $2 = 0.K);
    A3: for x being object st x in the carrier of V
    ex y being object st y in the carrier of K & P[x, y]
    proof
      let x be object;
      assume x in the carrier of V;
      then reconsider x9 = x as Vector of V;
      per cases;
      suppose B1: x in A1;
        l.x9 in the carrier of K;
        hence thesis by B1;
      end;
      suppose not x in A1;
        hence thesis;
      end;
    end;
    ex l1 being Function of the carrier of V, the carrier of K st
    for x being object st x in the carrier of V holds P[x, l1.x]
    from FUNCT_2:sch 1(A3);
    then consider l1 be Function of the carrier of V,
    the carrier of K such that
    A4: for x be object st x in the carrier of V holds P[x, l1.x];
    A5:
    now
      let v be Vector of V;
      assume
      A6: not v in A1 /\ Carrier(l);
      per cases by A6,XBOOLE_0:def 4;
      suppose
        not v in A1;
        hence l1.v = 0.K by A4;
      end;
      suppose
        not v in Carrier(l);
        then l.v = 0.K;
        hence l1.v = 0.K by A4;
      end;
    end;
    reconsider l1 as Element of Funcs(the carrier of V, the carrier of K)
    by FUNCT_2:8;
    reconsider l1 as Linear_Combination of V by A5,VECTSP_6:def 1;
    for x being object holds x in Carrier(l1) implies x in A1
    proof
      let x be object;
      assume B1: x in Carrier(l1);
      then reconsider x as Vector of V;
      l1.x <> 0.K by B1,VECTSP_6:2;
      hence thesis by A4;
    end;
    then AX1: l1 is Linear_Combination of A1 by TARSKI:def 3,VECTSP_6:def 4;
    defpred Q[object, object] means
    $1 is Vector of V implies
    ($1 in A2 & $2 = l.$1) or (not $1 in A2 & $2 = 0.K);
    A7: for x being object st x in the carrier of V
    ex y being object st y in the carrier of K & Q[x, y]
    proof
      let x be object;
      assume x in the carrier of V;
      then reconsider x9 = x as Vector of V;
      per cases;
      suppose B1: x in A2;
        l.x9 in the carrier of K;
        hence thesis by B1;
      end;
      suppose not x in A2;
        hence thesis;
      end;
    end;
    ex l2 being Function of the carrier of V, the carrier of K st
    for x being object st x in the carrier of V holds Q[x, l2.x]
    from FUNCT_2:sch 1(A7);
    then consider l2 be Function of the carrier of V, the carrier of K
    such that
    A8: for x being object st x in the carrier of V holds Q[x, l2.x];
    A9:
    now
      let v be Vector of V;
      assume
      A10: not v in A2 /\ Carrier(l);
      per cases by A10,XBOOLE_0:def 4;
      suppose
        not v in A2;
        hence l2.v = 0.K by A8;
      end;
      suppose
        not v in Carrier(l);
        then l.v = 0.K;
        hence l2.v = 0.K by A8;
      end;
    end;
    reconsider l2 as Element of Funcs(the carrier of V, the carrier of K)
    by FUNCT_2:8;
    reconsider l2 as Linear_Combination of V by A9,VECTSP_6:def 1;
    for x being object holds x in Carrier(l2) implies x in A2
    proof
      let x be object;
      assume B1: x in Carrier(l2);
      then reconsider x as Vector of V;
      l2.x <> 0.K by B1,VECTSP_6:2;
      hence thesis by A8;
    end;
    then AX2: l2 is Linear_Combination of A2 by TARSKI:def 3,VECTSP_6:def 4;
    for v being Vector of V holds l.v = (l1+l2).v
    proof
      let v be Vector of V;
      per cases;
      suppose B1: v in A1;
        then v in A1 \/ A2 by XBOOLE_0:def 3;
        then B2: not v in A2 by A2,B1,XBOOLE_0:5;
        thus l.v = l1.v + 0.K by A4,B1
        .= l1.v + l2.v by A8,B2
        .= (l1+l2).v by VECTSP_6:22;
      end;
      suppose B1: v in A2;
        then v in A1 \/ A2 by XBOOLE_0:def 3;
        then B2: not v in A1 by A2,B1,XBOOLE_0:5;
        thus l.v = 0.K + l2.v by A8,B1
        .= l1.v + l2.v by A4,B2
        .= (l1+l2).v by VECTSP_6:22;
      end;
      suppose B1: not v in A1 & not v in A2;
        then not v in A1 \/ A2 by XBOOLE_0:def 3;
        then not v in Carrier(l) by TARSKI:def 3,VECTSP_6:def 4;
        hence l.v = 0.K
        .= l1.v + 0.K by A4,B1
        .= l1.v + l2.v by A8,B1
        .= (l1+l2).v by VECTSP_6:22;
      end;
    end;
    hence thesis by AX1,AX2,VECTSP_6:def 7;
  end;
