Pattern Theory
In my efforts to understand my manic episodes from within, trying to bring my abstract mathematical reasoning skills to bear, I found the need to develop the concept of what I call simply a Pattern (when I write Pattern with a capital P, I explicitly mean this idea of Pattern). What resulted is not any kind of mathematical theory per se: there is no mathematics, nor is there anything one could do mathematics with. But in a sense it is the result of my imagining what such a theory would be like, much as a science-fiction author constructs an imaginary universe with imaginary science and maths. In a sense, it is closer to Isaac Asimov's psychohistory than an actual theory, but nonetheless, it is a major part of my efforts to understand what goes on in mania and psychosis. Perhaps one day someone will see how to turn it into something more substantial. All I can do here is to try to describe what I came to think of as Pattern Theory.
In terms of timeframe, much of these ideas have their origin in the late 00's. At the centre was a mythical 'Pattern Basis Theorem', some kind of major central result in the theory around which all else revolves. In a way it is like the theorem that 'every vector space has a basis'. But the world of Patterns doesn't admit as straightforward or universal structure as one would find in a vector space.
What Is A Pattern?
Let's consider Mind and brain, as these are what give rise to the idea and the need for it. Consider your Mind and brain as you see them, from the Interior. If you would take a snapshot of what is going on in your Mind at one particular time, as you see it, what form would that snapshot take? What properties would it have? How would that compare to snapshots of others? And what is the collection, or 'Pattern Space' of all possible Patterns that could be snapshots of the state of your Mind, viewed from the Interior?
If we instead consider your brain, and snapshots of neurological activity. That is, consider we take a complete picture of the state of every neuron and synapse, as we might take a snapshot of the state of a program in a computer's memory. How many of those snapshots would correspond to when we 'recognise an apple'? In a sense, the Pattern of 'an apple', to you, is that collection of brain-states in which you could be said to be 'recognising an apple'. Something like that.
Pattern Resonance
The initial thought inspiring this line of thinking is: where there is feedback, there is the possibility of resonance. So the output of our brain affects our body and the world in our immediate vicinity, and those effects affect the input our brain receives via our senses. So what is analogous to the resonance we see in electrical circuits that employ feedback. (Note that I have a very broad interpretation of the word 'resonance' here.)
Just as one thought leads to another, so one Pattern leads to another. Moreover, the presence of a Pattern at one time affects the likelihood of the same Pattern being present at a future time. This is what I call Pattern Resonance. The real-world analogue is found in electronics and digital signal processing. To give a concrete example, consider an IIR (Infinite Impulse Response) filter. To be more concrete, consider a digital biquad filter. Such a filter has feedback in the sense that the output of the next sample in the signal depends on earlier outputs. A FIR (Finite Impulse Response) filter, by comparison, only depends on its input signal.
Taking this idea of resonance in a digital filter as an analogue for what is going on in the brain, where instead of a real-valued discrete-time signal, we have a signal whose 'values' are Brain Patterns, and for which things are not computed in discrete time steps. We can then try to consider what the analogous behaviour of the brain would be. What corresponds to resonance as one would find it in a typical synthesiser? In particular, some synthesisers have filters capable of self-oscillation: if the feedback in the filter is too strong, the filter 'rings' at its resonant frequency, drowning out the input signal. When I conceptualise the disconnection-from-reality one experiences in psychosis, I liken it to this: excessive feedback and resonance in the brain lead to 'ringing', self-stimulating Brain Patterns which are insensitive to the neurological input going into the brain.