## mp.mathematical physics – Extension of Gibbs states with free boundary conditions

Let $$Omega_{0}:={-1,1}$$, $$mathcal{F}_{0} = 2^{Omega_{0}}$$ and $$nu_{0}$$ a given measure on $$(Omega_{0},mathcal{F}_{0})$$. If $$Lambda subset mathbb{Z}^{d}$$ is finite, we take $$Omega_{Lambda} := Omega_{0}^{Lambda}$$, $$mathcal{F}_{Lambda}$$ the $$|Lambda|$$-fold product $$sigma$$-algebra of $$mathcal{F}_{0}$$ with iself and $$nu_{Lambda}$$ the corresponding product measure. An element $$omega=(omega_{x})_{xin Lambda}in Omega_{Lambda}$$ is called a configuration of the system. Consider the (nearest neighborhood) Hamiltonian with free Boundary conditions and field $$h in mathbb{R}$$, which is a function $$H_{Lambda,h}^{emptyset}:Omega_{Lambda} to mathbb{R}$$ defined by:
$$begin{eqnarray} H_{Lambda, beta}^{emptyset}(omega) := -sum_{substack{x,y in Lambda \xsim y}}omega_{x}omega_{y} – hsum_{xin Lambda}omega_{x} tag{1}label{1} end{eqnarray}$$
The finite volume Gibbs state with free boundary conditions is the probability measure $$mu_{Lambda, beta,h}^{emptyset}$$ given by
$$begin{eqnarray} dmu_{Lambda,beta,h}^{emptyset}(omega) = frac{1}{Z_{Lambda,beta, h}^{emptyset}}e^{-beta H_{Lambda, h}^{emptyset}(omega)}dnu_{Lambda}(omega) tag{2}label{2} end{eqnarray}$$
where the partition function $$Z_{Lambda,beta,h}^{emptyset}$$ normalizes the measure. Now, take $$Omega := Omega_{0}^{mathbb{Z}^{d}}$$, $$mathcal{F}$$ the (infinite) product $$sigma$$-algebra on $$Omega$$ and $$nu$$ the corresponding product measure.If $$eta in Omega$$, it is convenient to define $$Omega_{Lambda}^{eta}:={omega in Omega: hspace{0.1cm} mbox{omega_{x} = eta_{x} if x in Lambda^{c}}}$$. The Hamiltonian with $$eta$$ as a boundary condition is a function on $$Omega_{Lambda}^{eta}$$ given by:
$$begin{eqnarray} H_{Lambda,beta}^{eta}(omega) := -sum_{substack{{x,y}cap Lambda neq emptyset \ xsim y}}omega_{x}omega_{y}-hsum_{xin Lambda}omega_{x} tag{3}label{3} end{eqnarray}$$
The finite volume Gibbs state, in this case, is the probability measure on $$Omega_{Lambda}^{eta}$$ (with discrete $$sigma$$-algebra) given by:
$$begin{eqnarray} dmu_{Lambda,beta,h}^{eta}(omega) = frac{1}{Z_{Lambda,beta, h}^{eta}}e^{-beta H_{Lambda, h}^{eta}(omega)}dnu_{Lambda}(omega) tag{4}label{4} end{eqnarray}$$

To study weak convergence of Gibbs states one would like to extend the above Gibbs states to a Gibbs state on all $$Omega$$. For the case of $$eta$$ boundary conditions, this can be done by defining on $$(Omega, mathcal{F})$$ a new probability measure by (with abuse of notation):
$$begin{eqnarray} dmu_{Lambda, beta,h}^{eta}(omega) = begin{cases} displaystyle frac{1}{Z_{Lambda,beta, h}^{eta}}e^{-beta H_{Lambda, h}^{eta}(Pi_{Lambda,eta}omega)}dnu_{Lambda}(omega) quad mbox{if omega_{x} = eta_{x} for all xin Lambda^{c}} \ displaystyle 0 quad mbox{otherwise} end{cases} tag{5}label{5} end{eqnarray}$$
where $$Pi_{Lambda, eta}$$ is the canonical projection $$Omega to Omega_{Lambda}^{eta}$$. Now, (ref{5}) cannot extend (ref{2}) because we cannot take $$eta$$ to be zero outise some $$Lambda$$, since $$Omega_{0} ={-1,1}$$.

Question: How to extend the finite volume Gibbs measure to $$Omega$$?

Possible solution: If I’m not mistaken, $$mu_{Lambda, beta, h}^{eta}$$ on $$Omega$$ as define by (ref{5}) is just the pushfoward of the corresponding measure $$mu_{Lambda,beta,h}^{eta}$$ defined by (ref{4}) with respect to the canonical injection $$i_{eta}:Omega_{Lambda}^{eta}hookrightarrow Omega$$. So I’m guessing $$mu_{Lambda,beta,h}^{emptyset}$$ can be extended to $$Omega$$ in the same way by taking the pushfoward of $$mu_{Lambda,beta,h}^{emptyset}$$ given by (ref{2}) with respect to the injection $$i_{0}:Omega_{Lambda}hookrightarrow Omega$$?

Posted on

## Sharepoint Designer 2013 Workflow with two conditions including variable

I have two SharePoint list – One is funnel and other is decision register.
If certain condition is met in Funnel for that item, it will be moved to other list Decision Register.

I have following conditions to check in Funnel list –

1. If Approval Status = CPO Approved and Decision Effective date is not blank then move to Decision Register list.
2. If Approval Status = CPO Rejected then move to Decision Register List.

For first condition it is mandatory to have Decision effective date whereas for second when Rejected Decision Effective date is not applicable.

I tried with following code in SD 2013 but it is not working as desired. For first condition when date is empty and Approval Status is CPO approved, it is still moving to Decision Register.

``````Stage:Stage 1
Step: 1
Set Variable: Decisiondate to Current Item:Decision Effective Date
If Variable: Decisiondate is not empty value
and Current Item:Approval Status equals CPO Approved
Create item in M-Milestone Decision Register (Output to Variable: create3 )
Delete item in Current Item
If Current Item:Approval Status equals CPO Rejected
Create item in M-Milestone Decision Register (Output to Variable: create3 )
Delete item in Current Item
``````

Transition to stage
Go to End of Workflow Posted on

## real analysis – Show that there exists a subsequence \${E_{n_k}}\$ of \${E_n}\$ such that \$m(cap_{k=1}^infty E_{n_k})>epsilon\$ under these conditions….

Question: Let $${E_n}$$ be a sequence of nonempty Lebesgue measurable subsets of $$(0,1)$$ such that $$lim_{nrightarrowinfty}m(E_n)=1$$. Show that for each $$0 there exists a subsequence $${E_{n_k}}$$ of $${E_n}$$ such that $$m(cap_{k=1}^infty E_{n_k})>epsilon$$.

My Thoughts: I am a bit stumped on this one. I am sure there is a technical way of doing it, but in my head, and this could be completely wrong, was thinking about taking each $$E_n$$ and, say, cut it in half and take the half such that the distance between any point on the interval of the cut and $$0.5$$ is smallest. If the half cut overlaps $$0.5$$, then choose that one. If the middle of the subset is exactly on $$0.5$$, then make the cut, and shift the subset to the left (or right) the length of $$frac{epsilon}{2}$$. Then, we get a bunch of subsequences that all lay “on top” of $$0.5$$, so they don’t have an empty intersection, and that would solve our problem (I think). But, I am a bit worried about the “for each $$0, because, say, if $$epsilon=0.8$$, then my method wouldn’t necessarily work, but really only works for a “small enough” $$epsilon$$. Maybe a more technical approach would be best…

Any thoughts, suggestions, etc. are greatly appreciated! Thank you.

Posted on

## mysql – How to do left join , same table with different conditions per column

You can move them together like here

Schema (MySQL v8.0)

``````CREATE TABLE polizamovtos  (
`idlote` VARCHAR(10),
`cargo` VARCHAR(10),
`abono` INTEGER,
`fechamovto` VARCHAR(10)
);

INSERT INTO polizamovtos
(`idlote`, `cargo`, `abono`, `fechamovto`)
VALUES
('2', '0', '5000', '2019-11-01'),
('1', '1000', '0', '2019-12-01'),
('2', '4000', '0', '2019-11-01'),
('1', '2000', '0', '2020-01-01'),
('2', '0', '500', '2020-10-02'),
('3', '4000', '0', '2020-01-01'),
('4', '5000', '0', '2020-01-01'),
('1', '2000', '0', '2020-01-01'),
('2',  '0',   '2000', '2020-04-02');
``````

Query #1

``````SELECT
IDLOTE,
SUM(cargo) as saldo
FROM polizamovtos
WHERE FECHAMOVTO='2020-01-01'
GROUP BY IDLOTE
having sum(cargo)-sum(abono) > 0;

| IDLOTE | saldo |
| ------ | ----- |
| 1      | 4000  |
| 3      | 4000  |
| 4      | 5000  |
``````

View on DB Fiddle

Query #2

``````SELECT
IDLOTE,
SUM(CASE WHEN FECHAMOVTO='2020-01-01'
THEN cargo
ELSE 0
END) as saldo
FROM polizamovtos
GROUP BY IDLOTE
having sum(cargo)-sum(abono) > 0;

| IDLOTE | saldo |
| ------ | ----- |
| 1      | 4000  |
| 3      | 4000  |
| 4      | 5000  |
``````

View on DB Fiddle

## Need to process string of conditions

I have an input file of the following format

``````        input           rule
collection-A    A.x==B.x IN [B.x==C.x]
collection-A    A.y>=5
``````

A, B, C – collections in MongoDB for the same database
x, y – column names of collections

How do I get data for a collection mentioned in the input column based on the query using logical operators in column rule?

## c# – Refactor multiple if-else conditions when condition is a minor change

I’m new programmer and I’m working on Xamarin MVVM app and I have a pin view like So, basically I have numbers from `0-9` if you pick one number its visible then if you pick a second one first one changed to `*` and I store all numbers into string called `PinCode`

ViewModel Code:

``````  public string PinCode { get; set; } = string.Empty;

{
//If button is a number then
if (button.Text != null)
{
if (PinCode.Length < 4)
{
PinCode = PinCode + button.Text;

//Assign every number field text depending of PinCode length
if (PinCode.Length == 1)
{
PinNumberOne = button.Text;
}
else if (PinCode.Length == 2)
{
PinNumberTwo = button.Text;
PinNumberOne = "*";
}
else if (PinCode.Length == 3)
{
PinNumberThree = button.Text;
PinNumberOne = "*";
PinNumberTwo = "*";
}
else if (PinCode.Length == 4)
{
PinNumberFour = button.Text;
PinNumberOne = "*";
PinNumberTwo = "*";
PinNumberThree = "*";
}
}
}
// if it's backspace button then
else
{
PinCode = PinCode.Remove(PinCode.Length - 1);

if (PinCode.Length == 3)
{
PinNumberFour = "_";
}
else if (PinCode.Length == 2)
{
PinNumberFour = "_";
PinNumberThree = "_";
}
else if (PinCode.Length == 1)
{
PinNumberFour = "_";
PinNumberThree = "_";
PinNumberTwo = "_";
}
else if (PinCode.Length == 0)
{
PinNumberFour = "_";
PinNumberThree = "_";
PinNumberTwo = "_";
PinNumberOne = "_";
}
}
return true;
}
``````

As you can see, I have a lot of repeated code and I know it’s possible to improve this method much better, but I can not find the way. If you guys have an idea of a recursion or how can I refactor this code to do something much clear and clean I really appreciate it. Regards

Posted on

## dnd 5e – How dangerous is this modified exhaustion compared to other harmful conditions?

Pretty powerful.

The problem with it, compared to other harmful conditions – it doesn’t go away without a spell. Most effects that cause stun or paralyze (or most other harmful conditions) have a very limited time (like ‘until next turn’) or allow a save every round and often have options like ‘when you’ve saved – you are immune’.

And even three levels of exhaustion can put party in quite a serious disadvantage in combat.
1st level – gives them disadvantage on ability checks – which may be not that often used in combat, but still sometimes called for – casters use it to counter higher-level spells, for example.
2nd level – halves movement – which means that with some smart maneuvering – melee fighters are out of combat as enemies would always outrun them (if battlefield allows for it, of course). And fragile casters would have troubles escaping from harm.
3rd level – disadavantage on attack rolls and saving throws – affects all the party, so only caster with save-based spells are more or less unaffected.

And there is no way to remove such condition, except for burning a spell slot or healing ability. So, as an ability that monster(s) can spam every turn – it feels a bit overpowered. It may work as an ability that monster can fire once or twice per combat – though still feels quite powerful (assuming that there is more than one monster of such kind).

Posted on

## dnd 5e – Unlisted effects of Conditions

In a game I DM’d, a PC had cast a spell with a Concentration requirement and was subsequently Paralyzed. I quickly checked the description of the Paralyzed condition, which said nothing about Concentration but did say that the character was Incapacitated. I checked Incapacitated, which also says nothing about Concentration. I thus ruled in-game that the PC could maintain concentration on the spell even while Paralyzed.

However, post-game, I read the description of Concentration, where it clearly says that you lose Concentration when you are Incapacitated. It seems (in my opinion) like that is an important enough consequence of the Incapacitated condition that it should be listed with the description of the condition.

So now I wonder – are there other instances of Conditions which have consequences that are not listed in the description of the Condition itself, but are found somewhere else?

Related: What would be the implications of ignoring the incapacitated condition tied to the paralyzed condition?

## fitting – Find the best fit with some conditions

I have this code to find the best values for $$l$$, $$s$$ and $$j$$:

``````Clear(j,l,s,norm,maxx,maxy);
data=Import("https://pastebin.com/raw/2DG5Xes6","Table");
g=3/2+(s(s+1)-l(l+1))/(2j*(j+1));
(Mu)=9.274*10^-24;k=1.380*10^-23;
y=(Mu)*g*j*x/k;
maxy=Max(data((All,2)));maxx=Max(data((All,1)));minx=Min(data((All,1)));
conds={Mod(l,1)==0&&Mod(j,1/2)==0,j-s==0||j-(l+s)==0||j-Abs(l-s)==0};
b(x_)=maxy*(((2j+1)/(2j))Coth((y(2j+1))/(2j))-(1/(2j))Coth(y/(2j)));
fit=FindFit(data,{b(x),conds},{l,j,s},x)
``````

$$l$$ is an integer and $$j$$ and $$s$$ are half-integers. One of this conditions also must hold:

``````j-s==0||j-(l+s)==0||j-Abs(l-s)==0
``````

I tried to fit the data using all those conditions but the result was $$l=s=j=1$$, which is not the best fit. I happen to know the correct parameters for this case $$(l=0,s=j=3/2)$$ and if I use those as the initial guesses, I do find the correct fit. Is it possible to rewrite the conditions so that Mathematica gives the best fit automatically?

## Defining these conditions in Maple using the geom3d package

Given the three points $$A(5,-4,-3)$$, $$B(9,1,-2)$$, $$C(14,16,18)$$. Let:

S1 be the sphere with centre $$A$$ and radius 12,
S2 be the sphere which has the line segment $$BC$$ as a diameter,

$$T$$ be the circle of intersection of S1 and S2,
$$E$$ be the centre of $$T$$

L1 be the line through $$B$$ and $$E$$,
L2 be the line through $$A$$ parallel to $$begin{pmatrix} 1\ 1\ 2 end{pmatrix}$$.

How do I use the package geom3d to set all this information?

My attempts:

For the points $$A$$, $$B$$ and $$C%$$, I used `point(A,(5,-4,-3))`. I know that you need to use `sphere(S1,(B,C))` although I am unsure how to set $$BC$$ as the diameter. All information with the (*) beside it are the ones I am in need of assistance with.

Any help or guidance is greatly appreciated!

Posted on