What I mean by this question is if our free will is merely an illusion. The same conditions produce the same results, so if an exact copy of me was made in my sleep and replaced my, would it have the same exact thoughts as I would?
You are mixing two issues here:
is if our free will is merely an illusion?
Depends on who you ask. The way you put it, "Are our thoughts merely a product of chemical reactions?" - i.e. by adopting a physicalist stance, there are two possible possible replies:
- Freewill is an illusion, our actions are dictated by the rules of chemistry and neurobiology, and our thoughts and the seemingly causal effects they have on our actions are only after effects of these chemical reactions. Mental states and thoughts, can't on their own have any causal effects on the real world. This position is called epiphenomenalism.
- Freewill exists for real, but we need to be careful about the definition: Freewill is the ability to act according to our own motivations, not the ability to act independently of the laws of physics and chemistry. As long as we are free to act according to our own desires, it doesn't matter that these desires are the product of brain chemistry. We are not being forced by anyone ore anything and thus we have freewill. This is called compatibilism. Daniel Dennett is a good source for learning more about compatibilsim.
if an exact copy of me was made in my sleep and replaced my, would it have the same exact thoughts as I would?
- If you subscribe to physicalism, yes. The copy you describe would have the same thoughts and it would be you.
- If you are a dualist, then no. What ever copying process was used won't be able to copy the non material component of your mind. The copy would be at best be a p-zombie, and at worst be dead.
That is a very interesting question, and I think the answer by Cort Ammon gave you a good basis for doing further investigation. I would add that, while chemical reactions (macro) on a whole behave consistently the same, on a micro level they don't. This leads to variations in steel, chemical impurities and such. To take it a step further, what effect does quantum fluctuation have on your thinking as well? This should also make us question how sound our logic is if we have quantum fluctuations playing a significant role in our brain chemistry.
who are you calling mere? Though you seem to have some perfectly adequate answers here, I'll toss in my two cents.
Your question is one (actually more than one) that appears in many guises in philosophy. You might wiki the "Swampman" argument by Donald Davidson, which addresses the role of continuous identity in consciousness and your "exact copy" of yourself. Many philosophers deny, on the basis of Leibniz's "identity of indiscernibles," also wikiable, or on the basis of simple physics that this idea of "exact copy" makes no logical sense to begin with.
As to the question of physical brain states determining "thoughts," that is a long argument going back at least to Descartes or arguably Lucretius. I would question "mere" chemical reactions, since we are, so science tells us, biochemical-electromagnetic organisms interacting with various fields, with billions of parallel neural connections, giving rise to "emergent" and possibly "quantum" effects. Nothing "mere" about it.
In such complex domains, even "hard sciences" find it doubtful that we can causally equate "same conditions" with "same outcomes." We can only measure "probabilistic" outcomes and never fully eliminate some level of randomness or indeterminacy. At the macrolevel we can talk about things being "the same" or "identical" or "continuous." But at the microlevel no subatomic state in the universe is ever really "the same." It is Heraclitean flux all the way down... which is what we mean by "time."
So what "holds it together"? Fresh answers arise in the literature almost daily! If you are interested, one good introductory book on these kinds of groundwork problems is Think by Simon Blackburn, which has good overviews of the issues you address, not at all technical, but with references to some of the key historical philosophers, such as Descartes and Hume. And there are many other books as well. Please don't discover the final answer. You would put so many philosophers and scientists out of work...
For starters, I would like to warn you, that his answer of mine is opinion-based.
I - as a practicing atheist, and mostly materialist - think our thoughts are obviously the products of the chemical and electrical reactions within our body (mostly our nervous system). I once was lucky enough to be able to see an open brain surgery, so I have seen when the brain surgeon used an electrode to induce certain emotional and intellectual reactions in the subject, so I'm absolutely, positively sure about that. Every emotional change occurs when a chemical balance shift happens in our brains and every thought appears when the electromagnetic field of our brains is altered. I'm also sure that if a perfect replicant - up from quantum-levels - can be created of you while you sleep, and you can be replaced with it, there would be no difference.
My counter-question is the following: Does that mean there is no free will? If you know, how a computer perfoms a complex calculation will the calculation be lesser performed? In case of a weather forecast, can you say "Well, the computer only sets ones and zeros in integrated circuitry according to some arithmetic rules, so it is not weather forecast."? Or if you know a rainbow is only light fractured in the raindrops will it cease to be a rainbow?
My side argument is: About your "exact copy" question, that is physically impossible. In the process of thinking, quantum-level events can - and will - be involved time-to-time, so you the evil copying people would have to make a copy of you up from quantum-level which is - according to the improbability relation of Heisenberg - not possible.