What’s a set of sentential formulas satisfied by $aleph_0$ assignments in ${0,1}$-logic but $2^{aleph_0}$ assignments in ${0,1/3,2/3,1}$-logic?

${0,1/3,2/3,1}$ logic has the following connectives:

$neg r= 1-r$

$rwedge s=min{r,s}$

$rvee s=max{r,s}$

$rrightarrow s=min{1,1+s-r}$

$roplus s=min{r+s,2-r-s}$

$rleftrightarrow s=min{1+r-s,1+s-r}$

Assume there are countably many atoms. All connectives are allowed in constructing the set. But truth constants are not allowed.

I cannot think of an example. Any hints?

integer programming – Constraint satisfaction problem: solve system, then evaluate whether many additional constraints are satisfied one at a time

I have a system that consists of binary equality and inequality constraints:

a < b
b < c
x < y
y = z

and I would like to answer questions about the system, such as “is a greater than c?” and “is b greater than x?”.
One approach would be to formulate this as an integer linear program: in the example above, the variables would have domains (0, 5) and a feasible solution might be:

a = 0
b = 1
c = 2
x = 0
y = 1
z = 1

I could then answer “is a greater than c?” by comparing the integer values assigned to a and c.
However, I could get the wrong answer for “is b greater than x?”: the solution above suggests yes, but there exists another feasible solution

a = 0
b = 1
c = 2
x = 1
y = 2
z = 2

in which the answer appears to be no. (The correct answer is that we cannot determine the relationship between b and x.)

Now, I could generate ALL the feasible solutions, iterate over them, and check whether b > x in each one — but I have to answer enough of these questions that this approach would be too slow.

Is there a more efficient and elegant way? Perhaps constraint programming is not even the right way to think about this — I considered formulating it as a directed graph-search problem instead, where directed edges represent inequality relationships, but my actual system contains conditional constraints as well. The wonderful answer that I received on a related question (https://scicomp.stackexchange.com/questions/36090/constraint-programming-problem-with-conditional-constraints-and-some-unknown-ind) directed me here. Glad for any suggestions or references to relevant papers or textbooks!

Not satisfied with the current members in my Facebook group — what steps can I take?

I am not happy with the members in my facebook group "TCI/A360 friends". I really need at least one of my female friends in the group.

ct.category theory – Are there axioms satisfied in commutative rings and distributive lattices but not satisfied in commutative semirings?

Consider the language of rigs (also called semirings): it has constants $0$ and $1$ and binary operations $+$ and $times$. The theory of commutative rigs is generated by the usual axioms: $+$ is associative, commutative, and has unit $0$; $times$ is associative, commutative, and has unit $1$; $times$ distributes over $+$; and $0$ is absorbing for $times$.

Every commutative ring is a commutative rig (of course), and every distributive lattice as well (interpreting $bot$ as $0$, $top$ as $1$, $vee$ as $+$, and $wedge$ as $times$). In fact, the category of commutative rings is a full reflective subcategory of the category of commutative rigs, as is the category of distributive lattices. The intersection of the two is trivial, in the sense that only the trivial algebra is both a ring and a lattice. (In a lattice, $top vee top = top$; but in a ring $1 + 1 = 1$ implies $0 = 1$.) What I am wondering is how close do these two subcategories come to capturing “all” the possible behaviour of commutative rigs. More precisely:

Question 1. Is there a Horn clause in the language of rigs that is true in every commutative ring and every distributive lattice but false in some commutative rig?

Since commutative rings are not axiomatisable in the language of rigs using only Horn clauses, I would also be interested to hear about, say, cartesian sequents instead of Horn clauses. This can be phrased category theoretically:

Question 2. Is there a full reflective subcategory $mathcal{C}$ of the category of commutative rigs that is closed under filtered colimits and contains the subcategories of commutative rings and distributive lattices but is not the whole category? (Furthermore, can we choose such a $mathcal{C}$ so that the reflection of $mathbb{N} (x)$ (= the free commutative rig on one generator) represents a monadic functor $mathcal{C} to textbf{Set}$?)

I don’t want to be too permissive, however – since commutative rings and distributive lattices can both be axiomatised by a single first order sentence in the language of rigs, taking their disjunction yields a sentence that is true in only commutative rings and distributive lattices but false in general commutative rigs.

Here is an example of a second-order phenomenon that occurs in commutative rings and distributive lattices that does not occur in every commutative rig: every ideal in a commutative ring or distributive lattice is subtractive. That is, if $A$ is a commutative ring or distributive lattice and $I subseteq A$ is closed under addition and $a in A text{ and } b in I implies a times b in I$, then $a in I text{ and } a + b in I implies b in I$. In a commutative ring this is because we have additive inverses; in a distributive lattice this is because ideals are downward-closed. It would be interesting if this second-order phenomenon reflects some deeper first-order phenomenon.

mysql – Need data from A and B table it the condition satisfied, if table B not satisfied then need data only from table A

I have Table A and B,I have seperate condition for table A and B,I need if both condition satisfied for both the tables then I need data from table A and B else I need it from A.

select a2 from table A where a1=1; — field columns a1,a2,ab

select b2 from table B where b1=1; — field columns b1,b2,ab

select * table C — columns ab

what is the issue am facing is if B condition fails iam not able to get the data from A.
Here below I added my trial code

select * table C where ab in (select a2 from table A where a1=1) and select * table C where ab in (select b2 from table B where b1=1)

Are You Satisfied With Your Broker? – General Forex Questions & Help

Hmmmm. To start with, if one’s not satisfied with the services of his broker, there’s no point sticking with them. First, one need to find with broker that provides the kinda services he wants. For me, the moment am not satisfied with a broker, I don’t hesitate to switch. Am satisfied and very comfortable with my current broker..

Hmmmm. To start with, if one’s not satisfied with the services of his broker, there’s no point sticking with them. First, one need to find with broker that provides the kinda services he wants. For me, the moment am not satisfied with a broker, I don’t hesitate to switch. Am satisfied and very comfortable with my current broker..

Hmmmm. To start with, if one’s not satisfied with the services of his broker, there’s no point sticking with them. First, one need to find with broker that provides the kinda services he wants. For me, the moment am not satisfied with a broker, I don’t hesitate to switch. Am satisfied and very comfortable with my current broker..

Hmmmm. To start with, if one’s not satisfied with the services of his broker, there’s no point sticking with them. First, one need to find with broker that provides the kinda services he wants. For me, the moment am not satisfied with a broker, I don’t hesitate to switch. Am satisfied and very comfortable with my current broker..

Has anyone satisfied the UK fiancee/spouse visa financial requirements by working their foreign job remotely as someone self-employed in the UK?

I’m a UK citizen with a Japanese fiancee. We plan to get married in the UK, so we want to apply for his entry under the fiancee visa. However, we don’t meet the financial requirements yet — I’m searching for, but haven’t yet secured, a UK-based job. That said, I have a Japanese job that meets the income requirement and would be willing for me to work remotely.

I spoke to a Japanese visa firm who suggested it would be possible to count J-income if

  1. I paid tax on the income in the UK.
  2. I became self-employed in the UK and submitted that documentation.

However, it seems like the forms for the self-employed look to a past year of s.e. income, which I don’t have.

Tldr; Has anyone satisfied the UK fiancee/spouse visa financial requirements by working their foreign job remotely as someone self-employed in the UK?

reference request – A property of categories satisfied by categories of algebraic structures

I know almost nothing about category theory, but I need some in my current work. I isolated a property of categories that I need to use in a proof, and that is shared by many classical categories, and I would like to know if it is well known, if it has a name, if it is implied by some classical property of categories…

Recall that a family of arrows $(f_i)$, all having the same codomain, is called collectively epimorphic if it satisfies the following condition: for every arrows $g, h$ whose domain is the same as the codomain of the $f_i$‘s, if for every $i$, we have $g circ f_i = h circ f_i$, then $g = h$.

Say that a category $mathcal{C}$ has property $(*)$ if for every family $(f_i)$ of arrows in $mathcal{C}$, we can find a collectively epimorphic family $(g_i)$ on the same index set, and an arrow $h$, such that for every $i$, we have $f_i = h circ g_i$.

If $mathcal{C}$ admits coproducts, then $mathcal{C}$ obviously satisfies $(*)$. But there are also natural categories that do not admit coproducts that satisfy $(*)$. For instance, consider the category $mathcal{C}$ whose objects are a certain kind of algebraic structures (e.g. groups, rings, vector spaces over a fixed field…) and whose arrows are embeddings. Then $mathcal{C}$ satisfies $(*)$. Indeed, if we denote by $A$ the codomain of the $f_i$‘s, then we can let $B$ be the substructure of $A$ generated by the ranges of all the $f_i$‘s, for $h$ the inclusion of $B$ into $A$, and for $g_i$ the mapping which is the same as $f_i$ as a function, but whose codomain has been replaced by $B$.

My question is the following:

Is there a classical property of categories that implies $(*)$, and that is satisfied by the kind of categories considered above (categories of algebraic structures with embeddings)?

ag.algebraic geometry: can a family of polynomial curves be identified by a polynomial satisfied by its derivatives?

Suppose we have a family of 1-parameter curves that foliates a subset of the plane, defined by a function that is a polynomial at the coordinates $ (x, y) $ and a parameter that identifies the individual curves.

For example, the family of curves defined by:

$$ P (x, y, a) = 16 a ^ 2 left (x ^ 2 + y ^ 2-a ^ 2 right) – left (2 x_f x + y_f left (2 y-y_f right ) -x_f ^ 2 right) left (8 a ^ 2 + 2 x_f x + 2 y_f y-x_f ^ 2-y_f ^ 2 right) = 0 $$

is the set of confocal ellipses with foci in $ (0,0) $ and $ left (x_f, y_f right) $, with the parameter $ to $ giving the semi-major axis of each ellipse.

Associated with this family of curves is a field of tangents to the curves: at each point $ (x, y) $ a single curve passes through the point, and if we choose an orientation we can assign a unit vector to each point that is tangent to that curve.

We can derive a polynomial equation satisfied by the components of these tangent vectors, $ (x & # 39 ;, y & # 39;) $ along with the coordinates $ (x, y) $assuming we have parameterized each curve as $ left (x_a (t), y_a (t) right) $ then taking the derivative of $ P (x_a (t), y_a (t), a) $ with respect to $ t $, to produce a polynomial $ D (x, y, x & # 39 ;, y & # 39 ;, a) $. In our example, we have:

$$ D (x, y, x & # 39 ;, y & # 39 ;, a) = 16 a ^ 2 left (2 xx & # 39; + 2 y y & # 39; -x_f x & # 39; -y_f y & # 39; right) -4 left (2 x_f x + 2 y_f y-x_f ^ 2-y_f ^ 2 right) left (x_f x & # 39; + y_f y & # 39; right) $$

When $ P $ and $ D $ they are zero their resultant with respect to $ to $ will be zero, and we have:

$$ Res_ {a} (P, D) = left (y & # 39; right) ^ 4 left (2 x ^ 3 x_f left (2 y-y_f right) y_f + x ^ 2 left (x_f ^ 2 left (-2 y y_f + y_f ^ 2-4 y ^ 2 right) + y_f ^ 2 left (y_f-2 y right) {} ^ 2 right) +2 xy ^ 2 x_f left (2 x_f ^ 2 + y_f left (y_f-2 y right) right) -y ^ 2 x_f ^ 2
left (x_f ^ 2 + y_f left (y_f-2 y right) right) right) {} ^ 2+ left (x & # 39; right) ^ 4 left (2 x ^ 3 x_f left (2 y-y_f right) y_f + x ^ 2 left (x_f ^ 2 left (-2 y y_f + y_f ^ 2-4 y ^ 2 right) + y_f ^ 2 left (y_f-2 y right) {} ^ 2 right) +2 xy ^ 2 x_f
left (2 x_f ^ 2 + y_f left (y_f-2 y right) right) -y ^ 2 x_f ^ 2 left (x_f ^ 2 + y_f left (y_f-2 y right) right) right) {} ^ 2-4 left (x & # 39; right) ^ 3 y & # 39; left (x ^ 3 left (2 y-y_f right) + x ^ 2 x_f left (y_f-3 y right) + xy left (x_f ^ 2 + 3 y
y_f-y_f ^ 2-2 y ^ 2 right) + y ^ 2 x_f left (y-y_f right) right) left (2 x ^ 2 x_f y_f-x left (x_f ^ 2 left ( y_f + 2 y right) + y_f ^ 2 left (y_f-2 y right) right) + y x_f left (x_f ^ 2 + y_f left (y_f-2 y right) right) right ) {} ^ 2 + 4 x & # 39;
left (y & # 39; right) ^ 3 left (x ^ 3 left (2 y-y_f right) + x ^ 2 x_f left (y_f-3 y right) + xy left (x_f ^ 2 + 3 y y_f-y_f ^ 2-2 y ^ 2 right) + y ^ 2 x_f left (y-y_f right) right) left (2 x ^ 2 x_f y_f-x left (x_f ^ 2 left (y_f + 2 y right) + y_f ^ 2
left (y_f-2 y right) right) + y x_f left (x_f ^ 2 + y_f left (y_f-2 y right) right) right) {} ^ 2 + 2 left (x & # 39; right) ^ 2 left (y & # 39; right) ^ 2 left (-4 x ^ 3 x_f + x ^ 2 left (2 x_f ^ 2 + 8 y y_f-y_f ^ 2- 8 y ^ 2 right) + y ^ 2 left (2
left (y-y_f right) {} ^ 2-x_f ^ 2 right) +2 xy x_f left (4 y-3 y_f right) +2 x ^ 4 right) left (2 x ^ 2 x_f y_f-x left (x_f ^ 2 left (y_f + 2 y right) + y_f ^ 2 left (y_f-2 y right) right) + y x_f left (x_f ^ 2 + y_f left (y_f-2
y right) right) right) {} ^ 2 $$

So we have removed the parameter $ to $ to get a homogeneous polynomial in $ (x & # 39 ;, y & # 39;) $ will be zero for any field of tangents to the curves, since any multiple of $ (x & # 39 ;, y & # 39;) $ it will also give zero.

My question is: when and how can this construction be reversed? Given a polynomial $ R (x, y, x & # 39 ;, y & # 39;) $ Like this one that is satisfied with a field of tangents, is there any proof that can determine if it originated from a family of polynomial curves? And can the defining polynomial be reconstructed?

If we write a polynomial $ P $ of a sufficiently high degree, with unknown coefficients, we can carry out all this construction to produce a resulting polynomial, which we could then try to match with our $ R (x, y, x & # 39 ;, y & # 39;) $ solving a potentially very large number of polynomial equations at unknown coefficients.

So my question is: can we do better than that brute force approach?

For the specific case I am trying to solve, I have a polynomial satisfied by the tangent vectors that is degree 8 in the derivatives and degree 6 in the coordinates.

locked hash time contract – script verification flag not required (lock time requirement not satisfied) (code 64)

I am trying to redeem the following htlc (the Python script below) through timeout, however the tx redemption fails upon validating with the following error:

bitcoin.rpc.VerifyRejectedError: {'code': -26, 'message': 'non-mandatory-script-verify-flag (Locktime requirement not satisfied) (code 64)'}

The deserialization of the tx finance has a transaction lockout time of 422, while the current lockout height is 433. The final tx has a lockout time of 434, so I'm not sure what the problem might be.

htlc test script using python-bitcoinlib:

import sys
if sys.version_info.major < 3:
    sys.stderr.write('Sorry, Python 3.x required by this example.n')
    sys.exit(1)

import bitcoin
from bitcoin import rpc
from bitcoin import SelectParams
from bitcoin.core import b2x, lx, b2lx, COIN, COutPoint, CMutableTxOut, CMutableTxIn, CMutableTransaction, Hash160
from bitcoin.core.script import CScript, OP_DUP, OP_IF, OP_ELSE, OP_ENDIF, OP_HASH160, OP_EQUALVERIFY, OP_CHECKSIG, SignatureHash, SIGHASH_ALL
from bitcoin.core.script import OP_DROP, OP_CHECKLOCKTIMEVERIFY, OP_SHA256
from bitcoin.core.scripteval import SCRIPT_VERIFY_P2SH # VerifyScript
from bitcoin.wallet import CBitcoinAddress, CBitcoinSecret

import hashlib
from utils import VerifyScript
from bitcoin.core.script import *
from bitcoin.core.scripteval import *
from bitcoin.core.scripteval import _CheckExec, _ISA_BINOP, _ISA_UNOP, _CastToBool, _CheckSig

SelectParams('regtest')
proxy = bitcoin.rpc.Proxy()

# Set the preimage. This is the secret Bob will need to redeem the htlc
preimage = bytes(b'preimage'.hex(), 'utf8')

# Hashed version of the preimage which we can safely store on the blockchain
# and use to verify against what Bob offers
h = hashlib.sha256(preimage).digest()

# Bob
recipientpubkey = proxy.getnewaddress()

# Alice
senderpubkey = proxy.getnewaddress()

# privkey of Alice, used to sign the redeemTx
sender_seckey = proxy.dumpprivkey(senderpubkey)

# privkey of Bob, used to construct the htlc
recipient_seckey = proxy.dumpprivkey(recipientpubkey)

# How long the htlc will last until it times out
lockduration = 1
blocknum = proxy.getblockcount()
redeemblocknum = blocknum + lockduration

# We construct the locking script in the form of a standard bip199 htlc
txin_redeemScript = CScript((
    OP_IF,
        OP_SHA256, h, OP_EQUALVERIFY,OP_DUP, OP_HASH160, bytes(Hash160(recipient_seckey.pub)),
    OP_ELSE,
        redeemblocknum, OP_CHECKLOCKTIMEVERIFY, OP_DROP, OP_DUP, OP_HASH160, bytes(Hash160(sender_seckey.pub)),
    OP_ENDIF,
        OP_EQUALVERIFY, OP_CHECKSIG
))

# Generate a P2SH address from the locking script
txin_scriptPubKey = txin_redeemScript.to_p2sh_scriptPubKey()
txin_p2sh_address = CBitcoinAddress.from_scriptPubKey(txin_scriptPubKey)
p2sh = str(txin_p2sh_address)

# Load the htlc
amount = 1.0*COIN
fund_tx = proxy.sendtoaddress(txin_p2sh_address, amount)

# Fast forward time
print('before height ' + str(proxy.getblockheader(proxy.getbestblockhash(), True)('height')))
print('locktime ' + str(lockduration))
proxy.generatetoaddress(lockduration + 10, proxy.getnewaddress())
print('after height ' + str(proxy.getblockheader(proxy.getbestblockhash(), True)('height')))

# Construct the transaction which will redeem the htlc via the first payment route
txinfo = proxy.gettransaction(fund_tx)
txin = CMutableTxIn(COutPoint(fund_tx, txinfo('details')(0)('vout')))
default_fee = 0.001*COIN
txout = CMutableTxOut(amount - default_fee, senderpubkey.to_scriptPubKey())
tx = CMutableTransaction((txin), (txout))
tx.nLockTime = proxy.getblockheader(proxy.getbestblockhash(), True)('height') + lockduration
# Sign the redeem script with Alice's private key ( for whose address the first payment path
# is set up exclusively for )
sighash = SignatureHash(txin_redeemScript, tx, 0, SIGHASH_ALL)
sig = sender_seckey.sign(sighash) + bytes((SIGHASH_ALL))

# Load the script sig of Bob's redemption transaction with the appropriate values
txin.scriptSig = CScript((
    sig,
    sender_seckey.pub,
    0,
    txin_redeemScript))

# Verify
VerifyScript(txin.scriptSig, txin_scriptPubKey, tx, 0, (SCRIPT_VERIFY_P2SH,))

# Send
txid = proxy.sendrawtransaction(tx)