Proof of the superposition theorem in linear circuit analysis I couldn't find a proof of the superposition theorem from circuit analysis anywhere online.  I thought it might be helpful to ask and provide my proposed proof as an answer to gather feedback and improvements.
 A: It is generally said that the superposition theorem is a result that the circuit is linear.  I think that is not correct and actually a bit circular.  Because one describes the linearity of the input/output relationship of the circuit while the other talks about how to solve the circuit by turning off sources.
Here I prove that the superposition theorem in circuit analysis holds if you restrict to certain elements.
Motivating Example

Let's motivate the general proof with a specific example first.
Take a look at the attached circuit.
I'm going to use $I_C$ to denote the current of the current source and $V_V$ to denote the voltage of voltage source.
Small letter $v_1, v_2, i_1, i_2$ denote voltage and current across the resistor elements.
Systems of eqns are:
$$
V_V = v_1 + v_2 \\
I_C+i_2=i_1
$$
We switch the current source with open circuit and get the equations
$$
V_V = v_1'+v_2' \\
i_2'=i_1'
$$
Switch the voltage source with closed circuit and get equations
$$
0=v_1''+v_2'' \\
I_S+i_2''=i_1''
$$
Implicitly, there are also the Ohm's law equations such as
$$
v_i=R_ii_i
$$
The key thing to notice is that solutions to the "turned-off" circuits, I will now call them the basis circuits, the solutions are all homogenous except for the equations that involve the one element that remains.
That means when you add one solution from each basis circuit, most solutions do not affect the "in-homogenousness" of other solutions.
For example, if you add the primed variables to the double primed variables, you will get solution to the original circuit.  The primed solutions are homogenous  in the second equation, i.e. it won't "touch" \$i_i\$  while the double primed equations won't alter the voltage variables.
General Proof
In general, we can say translate all equations that govern our circuit into several forms, and see that this line of thinking works.
Kirckhoff Current Law
For each node in the circuit not directly attached to a voltage source, The Kirkhoff current law gives us equations of the form
$$
i_1+i_2+...i_k=I_{S1}+I_{S2}+...+I_{Sn}
$$
where the lowercase i on left hand side denotes unknown currents while right hand side denotes any current source connected to the node.  If there are no current source, it would just be zero.
The basis circuits obtained by turning off all sources except for one would either leave the right hand side with 0 or with one constant left.  The basis circuits obtained by keeping S1, S2, .. etc. would each contribute to each of the term on the right hand side.  When you add the solutions of all of them, you can see that the final solution satisfies the above equation.
This holds for all nodes.
Kirkhoff Voltage Law
For closed loops that do not have current source, Kirckhoff Voltage law has form
$$
v_1+v_2+...+v_k=V_{S1}+...+V_{Sn}
$$
The same argument as above holds.
Ohm's law
Ohm's law is homogenous and relates v and i.  So adding solutions to the basis circuits would also solve the Ohm's law equations for the full circuit.
This argument also holds for the other linear circuit elements such as inductors, capacitors, and could be extended if newer elements are discovered/created.  As long as the equation governing the element is a linear function in voltage, current.
